It's all about the answers!

Ask a question

[closed] Are there are examples of a working C# REST client for creating work items?


Andrew Trobec (49712139139) | asked Jan 20 '14, 5:07 a.m.
closed Jan 21 '14, 5:45 a.m.
Hello,

I am busy trying to create a working REST client in Visual Studio (C#) that creates work items but I am having trouble with getting it to work.  I can resolve the factory URL and create a work item to POST to the URL, but I can't get it to work.  The error I am currently facing is:

Data at the root level is invalid. Line 1, position 1.

Is there a working skeleton client or a tutorial somewhere that I can reference to see what I am doing wrong?

Thank you and best regards,

Andrew

Comments
Piotr Aniola commented Jan 20 '14, 7:24 a.m.

Does the same REST request work when you're using Java?


Andrew Trobec commented Jan 20 '14, 7:55 a.m.

@paniola

Hello Piotr,
Thank you for the response!  I cannot get the REST request to work with Java due to authentication issues.  For some reason I always get an unauthorized error when trying to connect.  That's a whole separate issue that I need to find time to address...
Regards,
Andrew


Piotr Aniola commented Jan 20 '14, 8:09 a.m.

So, how exactly does your request look like? It seems to me, based on the error message, that there is something wrong with the request, rather than with the C# language.


Andrew Trobec commented Jan 21 '14, 5:43 a.m.

@paniola

Hello Piotr,
I found out the problem.  It was very stupid.  I was passing the factory URL incorrectly and so I kept getting an error.  I fixed it and solved.
Thank you for your availability!
Best regards,
Andrew

The question has been closed for the following reason: "Programming parsing error that was identified and resolved." by spriteburn Jan 21 '14, 5:45 a.m.