cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

HTTP Client with Authentication

¡Resuelto!
Ir a solución

 

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
Mensaje 1 de 4
2.661 Vistas
Solución
Aceptado por 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
Mensaje 2 de 4
2.623 Vistas

Yep, that did it.

Thanks Mark.

Http post.PNG

 

0 kudos
Mensaje 3 de 4
2.580 Vistas

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
Mensaje 4 de 4
2.531 Vistas