LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Client with Authentication

Solved!
Go to solution

 

Dear Community,

I want to connect to a httpserver located on a device via LabVIEWs http- client- functions. The url I have to connect to is https based. I am transferring the functionality shown in the attached  python code to labview.

 

Http client python.png

 

VI Snippet.png

When I run the python code the connection is established and I receive the response: 200 ok.

When I run the labview code I get the error "404 Not found" with the message "Invalid hashcash".

Any ideas what went wrong?

 

 

 

0 Kudos
Message 1 of 4
(1,235 Views)
Solution
Accepted by topic author labviewette

The items you are passing are not header elements but th ebody of the POST. You need to create the JSON body with those attriutes and pass that to your post call.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 4
(1,197 Views)

Yep, that did it.

Thanks Mark.

Http post.PNG

 

0 Kudos
Message 3 of 4
(1,154 Views)

Hi!

 

Just to let you know: There is the JSON-to-Text VI in the string palette. Input in this case would be a cluster with three text controls labeled loginName, password and hashcash..

0 Kudos
Message 4 of 4
(1,105 Views)