Facing problem to get data from rest service using C# .
Sharad Choudhary (12●8●10)
| asked Nov 13 '14, 12:50 a.m.
edited Nov 17 '14, 5:45 a.m. by Ralph Schoon (63.7k●3●36●48) Hi , I am facing problem to get data from rest service using c# code. Code snipped are below. WebRequest req = WebRequest.Create(@"https://10.4.0.80:9443/ccm/oslc/workitems/catalog"); req.Method = "GET"; req.Headers[ "Authorization"] = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes("schoudhary:schoudhary")); HttpWebResponse resp = req.GetResponse() as HttpWebResponse; StreamReader reader = new StreamReader(resp.GetResponseStream()); string result = null; result = reader.ReadToEnd(); |
One answer
Ralph Schoon (63.7k●3●36●48)
| answered Nov 17 '14, 5:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I had to edit the question, because the pasted html content (with JavaScript) breaks the page.
I would suggest to use a browser to play with OSLC requests until you get them working, regardless of which language you use later. This is just an implementation detail.
See: https://rsjazz.wordpress.com/2014/11/10/give-me-a-rest/ for browser tools.
See https://jazz.net/library/article/635 for how to get started with OSLC in general.
See https://www.google.de/search?q=rest+c%23 for hints and links to do this with C#
PS: Our visual Studio Client is developed with C# as far as I know.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.