Where “rawModeData”: “{"email":"abc@tudip.com"}” is the BODY Part of the request.
How to make Above POSTMAN api (Above json is an Export of POSTMAN api call) call in ROKU ?.
Hi joetesta[/url:ynxhke3l],
Thanks for the Reply,
We have Tried with PostFromString(Request as string) but we get 400 -Bad Request reply from server.
We are confused about What should be the Request in the PostFromString() function. Any Solution with an example will be very helpful.
So, Could you Please provide an Example for this Scenario.
“ankitgaur” wrote:
We are making following API Call in Postman successfully…
i have no idea what “Postman” is - nor do i need to know more about it^. Can you send your data successfully using cURL? If yes, post here the command line that works - though i suspect figuring out how to send it with curl will help you figure out yourself how to send it from Roku.
(^) i looked on wikipedia and for me not having an article makes it “not significant enough”. yes, i also noticed existence of “getpostman.com” website which seems full of itself enough not to have an “About” page
“ankitgaur” wrote:
We are confused about What should be the Request in the PostFromString() function. Any Solution with an example will be very helpful.
So, Could you Please provide an Example for this Scenario.
The ‘request’ parameter is the query string, the exact string you’d send after the “?” if you were doing a GET request. The Roku OS internally converts the query string parameters into “body parts”.
You must also ensure that the query parameters are url-encoded, if necessary, e.g. using ifUrTransfer.Escape()
“belltown” wrote:
The ‘request’ parameter is the query string, the exact string you’d send after the “?” if you were doing a GET request. The Roku OS internally converts the query string parameters into “body parts”. …
That’s not quite true - in the sense that it’s a perfectly valid http having a POST that has both a “?” query string and a body at the same time. We recently looked into that on account of PHP muddying the waters with its method names. On the particular case your advise seems correct though
“belltown” wrote:
The ‘request’ parameter is the query string, the exact string you’d send after the “?” if you were doing a GET request. The Roku OS internally converts the query string parameters into “body parts”. …
That’s not quite true - in the sense that it’s a perfectly valid http having a POST that has both a “?” query string and a body at the same time. We recently looked into that on account of PHP muddying the waters with its method names. On the particular case your advise seems correct though
Hi EnTerr,
Following is the working CURL Command line URL for making API call