I have the URL I need and I don't care about the JSON return, I just need to get the 404 or 200 response. Are there any samples out there on how to accomplish this?There is a barcode verification API, that I'd prefer you use, you simply do a GET to a URL with the barcode value in the URL. This will return a 404 if invalid and a 200 (with a JSON body) if it is valid.
Simple GET request to a URL.
Simple GET request to a URL.
I'm working on a project where I need to validate a barcode number, read by a barcode scanner. My client has provided me with an API to validate the scanned number. The information provided to me is as follows:
Re: Simple GET request to a URL.
Look at the webclient examples....
The simplest is probably the
nburn\examples\standardstack\webclient\FindMyIp
uses a very similar API....
One line get with a result check...
Paul
The simplest is probably the
nburn\examples\standardstack\webclient\FindMyIp
uses a very similar API....
One line get with a result check...
Paul
Re: Simple GET request to a URL.
Hi Paul,
Thanks! This looks very close to what I need. I got the sample working properly on my device, but when I plug in my clients URL, the DoGet always returns false. I can see the return data when using the URL in a browser.
This is the test url: https://[removed since it's no longer needed]
Is there any way to just get the 404 or 200 results values?
Thanks! This looks very close to what I need. I got the sample working properly on my device, but when I plug in my clients URL, the DoGet always returns false. I can see the return data when using the URL in a browser.
This is the test url: https://[removed since it's no longer needed]
Is there any way to just get the 404 or 200 results values?
Last edited by jfox21381 on Fri Sep 23, 2016 10:54 am, edited 1 time in total.
Re: Simple GET request to a URL.
that request is HTTPS ie it uses TLS/SLL.
The other is HTTP....
Your site does not seem to respond to http requests....
So you need to get the site to allow http, or you need to purchase add SSL/TLS libraries for Netburner...
Paul
The other is HTTP....
Your site does not seem to respond to http requests....
So you need to get the site to allow http, or you need to purchase add SSL/TLS libraries for Netburner...
Paul
Re: Simple GET request to a URL.
When you sent the http request the
website responds with 301 moved permanently and provides the https address as the location it moved to.
Paul
website responds with 301 moved permanently and provides the https address as the location it moved to.
Paul
Re: Simple GET request to a URL.
Ok, that makes sense. I'll ask the client if that can allow the HTTP. Thanks again for your help!