问题
I have created AccessToken using https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+OAuth+authentication tutorial and could connected and get the data from jar file. I need to access it with c# app. I tried following code but it wasn't working.
var request = (HttpWebRequest)WebRequest.Create(apiUrl);
request.Method = "GET";
request.Headers.Add("Authorization", "Bearer " + API_Access_Token);
var response = (HttpWebResponse)request.GetResponse();
string html = string.Empty;
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
html = reader.ReadToEnd();
}
Original question was Access JIRA API with api key without username and password
来源:https://stackoverflow.com/questions/28214485/access-jira-api-with-c-sharp-using-accesstoken