How to use Curl with C#, windows forms application


I'm trying to integrate my desktop application with an online tool (ScrumWise), but they use Curl, I'm not able to consume the rest.

curl -k
  -d "projectIDs=729-11230-1,729-31745-129"
  -d "includeProperties=Project.backlogItems,BacklogItem.tasks"

I'm having difficulty in this second line here


how to transcribe this Curl in C#?


You don't exactly need to use cURL to do this. You can use RestSharp which is simpler to use:

var cookie = new CookieContainer();
var client = new RestClient("")
    Authenticator = new HttpBasicAuthenticator("", "69C0A6A9E957B6398BD8C62F3B67C95005CA"),
    CookieContainer = cookie

var request = new RestRequest(Method.GET);
request.AddParameter("application/x-www-form-urlencoded", "projectID=729-11230-1", ParameterType.RequestBody);
request.AddParameter("application/x-www-form-urlencoded", "name=Example backlog item 1", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Don't forget that you need to generate your own API Key. The one you are testing is just an example from the ScrumWise documentation .

Scroll to Top