使用AccessToken使用C#访问JIRA API
我使用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(); }
原始问题是使用api密钥访问JIRA API,没有用户名和密码
上述就是C#学习教程:使用AccessToken使用C#访问JIRA API分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/cdevelopment/1019658.html