Access JIRA API with C# using AccessToken

邮差的信 提交于 2019-12-23 12:34:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!