Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# REST login
I've written below C# code to login to JIRA Rest API:
 
var url = new Uri("http://localhost:8090/rest/auth/latest/session?os_username=tempusername&os_password=temppwd");
var request = WebRequest.Create(url) as HttpWebRequest;
if (null == request)
{
return "";
}
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = 200;
request.KeepAlive = false;
using (var response = request.GetResponse() as HttpWebResponse)
{
}
 

When I execute this, application just goes on running without returning any response. Please suggest if this is the right way of calling JIRA Login using REST API. Also please let me know how to use above login details to call a JIRA Rest API
Posted 8-Aug-12 8:27am
Edited 8-Aug-12 8:58am
(no name)91.1K
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 8 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100