LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP and LabVIEW

Solved!
Go to solution
When it worked before, was that without the authorisation? If so, the malformed header was probably ignored by the server. After you added the authorisation, it would stop working until you sent a valid authorisation header.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 11 of 16
(1,092 Views)

Yes, it was with authorization.

0 Kudos
Message 12 of 16
(1,082 Views)

would you be able to share the working .vi? 

I am having similar trouble but not able to fix it. Your solution would help greatly

0 Kudos
Message 13 of 16
(476 Views)

This was Sam's solution:  

Your 'headers' you are sending are malformed.

 

The 'add header' VI adds a key/value pair to the HTTP header. You are building the key value pairs yourself instead of letting the VI do them for you. You should call the 'add header' VI for each key/value header pair you want to send.

 

To do the authorisation, you just need to put 'Authorization' into the 'header' control and then your 'Basic **password**' as the value. That will add a line "Authorization: Basic **password" to the headers. The HTTP Client VI handles the other headers automatically itself (e.g. the timestamp).

 

You should check what is actually being received by the server (e.g. by checking server logs / logging the request / using a 3rd party checking service etc.).

 

0 Kudos
Message 14 of 16
(456 Views)

Thank you for your response.

 

I have tried to follow your advice but not about to get it working. Still getting authentication issues. Please find the attached .vi

 

I have used Postman (API monitoring tool) to check what is received and works fine. 

 

jephin27_0-1683107183112.png

 

0 Kudos
Message 15 of 16
(431 Views)

This helped.
Over the years solution is persistent!🙂

0 Kudos
Message 16 of 16
(219 Views)