Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to consume a rest service which requires a json as input body. Actually I am trying this with tRestClient but I do not know where to define the input body . The input body should be something like this:
{"username":"foo",
"password":"bar"
}
When I edit the input scheme then I can see that there is a row for body and string but not editable. I thought I can define there my json input. Also I could not find a valid example where this is shown. Do I need to read this input from a file with the tFileInputJson but how will it be added as body in the tRestclient?
Would be great if someone knows how to solve that.
@olja , use tRest component use below way the input body in HTTP Boday and HTTP Heder you nee to specify"Content-Type" as name "application/json" as value .
boday like below based on your
"{\"username\":\"foo\",
\"password\":\"bar\"
}
"
@olja , use tRest component use below way the input body in HTTP Boday and HTTP Heder you nee to specify"Content-Type" as name "application/json" as value .
boday like below based on your
"{\"username\":\"foo\",
\"password\":\"bar\"
}
"