HI,
I've not used the HTTPCaller using a POST request and body attribution.
The API call constructed by the developer has been provided like this:
var client = new RestClient("https://sww.smartchartapi.co.uk/api/Authentication/request");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "ASP.NET_SessionId=xcqkvogm2bp2yxshsgx1ncbg; AspxAutoDetectCookieSupport=1; __AntiXsrfToken=e680dfae824a472088c01d6672ba8471");
var body = @"{
" + "\\n" +
@" ""username"": ""SWWAPI"",
" + "\\n" +
@" ""password"": ""***""
" + "\\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
I've set up the HTTP caller like this but am getting a bad result. Any ideas what I am doing wrong?