I am trying to call an API in ROKU player using bright script. But I a getting "response code -3". But when I am hitting that service on Web Browser it gives the xml in response. Actually there is a redirection in the API which I am using. As I know the redirection is not handled by the ROKU OS level. So How will I come out this situation.
Please help me and provide me any solution for that how can I handle the redirection in ROKU?
Thanks in advance.
The documentation at http://sdkdocs.roku.com/display/sdkdoc/roUrlEvent gives CURLE_URL_MALFORMAT as name for the -3 code you got from GetResponseCode() on the roUrlEvent. Try checking the string you get from GetFailureReason() on that same roUrlEvent, which should give a more detailed description of the problem.
Please check if you are missing any header in http request.
Check for accept header also.
Check this link how to make Get and Post request in Roku.
request = CreateObject("roUrlTransfer")
request.SetUrl("http://blog.roku.com/developer")
html = request.GetToString()
Related
I am submitting a request for data from the Binanance API as follows:
https://api.bscscan.com/api
?module=logs
&action=getLogs
&fromblock=24726622
&toBlock=24726632
&address=0x94084b7a8d80b2c3cc0dccd87cb6ae3cc67d364d
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&apikey=JRYDR6FBWRKY5C8NMZJKFB8GEP1QHFQJQT
However, I can't get any data from this URL. I have double-checked, and I know that the parameters are correct.
Here is an example of using Binanace's API, which works well:
https://api.bscscan.com/api
?module=logs
&action=getLogs
&fromBlock=4993830
&toBlock=4993832
&address=0xe561479bebee0e606c19bb1973fc4761613e3c42
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&apikey=YourApiKeyToken
Why is that working but mine not working?
I would highly suggest using Postman, which you can use to quickly test requests. I ran your request, with api-key, through Postman and was able to get a 200 response with data. See this screenshot.
Please note I blanked out the api key value. I suggest you do the same in your post unless its fake.
I had to remove the line breaks in the code you pasted. Could this possibly be the issue?
I need a tool which gives me a URL to make a HTTP request that will be recorded and it shows me what body was sent, which headers, which parameters, the method...
It's like something kind of opposite of Postman.
I tried to find such type of tool/service but didn't find any. If someone knows something similar, please let me know, thank you.
Actually, Postman has a feature which captures the request:
Enable it and just make the call to the set port (localhost:5555 by default) and it will be saved under the request history.
I have just installed openchain (http://openchain.org)
I can check it on http://nossl.wallet.openchain.org/ but I would like to check API using Postman Rest client tool on my PC.
I'm using postman rest client and I have tried URI many times but response is empty : https://docs.openchain.org/en/latest/api/method-calls.html
Please give some advises, thanks in advance !
You should want it to look like something like this picture. Check your headers also, when I use the URL https://www.openchain.org/endpoint/query/recordversion?key=FFFF I get nothing and then when I check the headers I see there is a 404 status which means I was able to communicate with the server but it couldn't find my key. Which makes sense since I am just passing a random key. So see if you are getting a 404 error in your headers and if so then make sure your key is correct.
I am trying to make calls using REST API and the Language I am using isn Apex.However,it is throwing me error saying 'Url parameter is required. For more information, see '
I am using Endpoint URL as follows :-
https://api.twilio.com/2010-04-01/Accounts//Calls.json?Url=http://demo.twilio.com/docs/voice.xml
If you see I am adding the Url param to the endpoint,still it is throwing me an error.
I am able to send SMS through Rest API,the issue is only when I am making calls.
Please suggest.
Thanks
Url must be POSTed to the API, you are now sending it as a GET parameter.
Change your code so that it does a POST instead of a GET and sent the Url parameter as a POST variable.
(see http://www.twilio.com/docs/api/rest/making-calls#post-parameters)
Also you left out the {AccountSid} in your URL, that's required as well. Of course you may have left it out because you don't want it publicly visible on SO, but I can't from here that that's your reason ;)
Well it's one step forward and two steps back for me. Thanks to you guys, I finally got the GET for my webservice working in JMeter. Now I'm trying a POST, and once again I'm not getting anywhere.
I'm using a HTTP Request and made the POST body as small as possible: <the_tag></the_tag>.
I even took the xml out and just used text.
No matter what's in the body, I get the 415 error.
What am I missing?
My implementation is HC3, protocol https, and I don't have anything else selected (other than the POST, of course). I also set the Content-Type to text/xml.
P.S. I should add that this POST works fine in SoapUI, so I don't think it's a server issue.
Did you check the content type of your request ?
What is it ? What should it be ?
To set it, add a header manager as child of your sampler and set :
content-type in column 1
application/xml in column 2
If you're looking to learn jmeter correctly, this book will help you.
Do not forget header manager, and there: