From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,605 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,567 Views)

Yep, that did it.

Thanks Mark.

Http post.PNG

 

0 Kudos
Message 3 of 4
(1,524 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,475 Views)