我使用https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+OAuth+authentication教程创建了AccessToken,可以连接并从jar文件中获取数据。我需要使用c#app访问它。我尝试了以下代码,但它无法正常工作。
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();
}
原始问题是Access JIRA API with api key without username and password