11-05-2015 02:06 PM
Hello,
I downloaded the HTTP protocol example: http://www.ni.com/example/28153/en/
However, I am not sure where to put the authentication (base64 username:password).
thanks in advance.
11-06-2015 03:46 AM
Which version of LabVIEW are you using?
Newer versions have the HTTP Client library which includes the ability to use HTTP Authorisation:
You can wire a username/password into the Open Handle VI.
11-06-2015 11:52 AM
Hello Sam,
Your response is of great help! I will try to see if this helps me and report back.
Joseph
11-09-2015 07:24 PM
Hello Sam,
I have coded the GET.vi. I first "open handle", then GET, then close the handle. I am getting "301Moved Permanently". I understand this is a redirection. I try the redirected URL and still no luck. I get "could not verify authenticity".
However, when I insert "www.ni.com" with the above code, I get a 200 Ok.
Also, when I used this site: https://www.hurl.it/ to check out the website for my project, I get a 200 Ok (both redirected URL and original URL is used).
11-10-2015 05:27 PM
Hi Joseph,
What are you trying to GET from? That interaction sounds like something coming from the web service end.
Regards,
11-11-2015 02:22 PM
Hello Vitsen,
I am trying to do a simple test for now. Obtain a "200 OK" when excuting the GET.VI. I have used www.ni.com with sucess. But when I use the website for my project, I get a 301. I use the redirected website I get "could not verify authenticity".
thanks in advance.
11-11-2015 02:33 PM
Hello Vitsen,
In my opinion, I think it is on the LabVIEW end because, I have used https://www.hurl.it/ to see if the GET command fails. I does not. But with LabVIEW it fails.
11-12-2015 03:25 PM
Hi Joseph,
It definitely is strange that your website isn't working. However in most scenarios, OpenHandle.vi from the HTTP client palette works for basic access authorization. Is that what you have set up with your website? Would the base64 representation make any difference?
11-12-2015 04:43 PM
Hello Yiran,
I don't think it is an authentication issue. I say this because in the the following website: https://www.hurl.it/ I can insert the website and get a "200 OK".
11-12-2015 05:17 PM
Yiran,
I forgot to mention, that website, https://www.hurl.it/ , I don't use any authentication.