LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS POST

Hi Steve Chandler, 

 

Thank you for the example. I will try it. Is there any way to do SSL? Does the web browser handle that? Also, how do I read back the response form the web server? It will be sending back XML information that I will have to parse.

 

Thank you.

0 Kudos
Message 11 of 25
(3,366 Views)

I also found examples showing how to use the .NET web requests to send a HTTP post and it states that you can use HTTPS as well. Proxy confguration appears to be also available. Link: http://forums.ni.com/t5/LabVIEW/NET-Http-Https-Get-document/m-p/405426?requireLogin=False

 

But for some reason when I select the webrequest under .NET constructor it states that a public constructor is not available. Is there any way to get this on my computer (make available) so that I can try this to see if it works?

0 Kudos
Message 12 of 25
(3,364 Views)

@Dru1d wrote:

But for some reason when I select the webrequest under .NET constructor it states that a public constructor is not available.



That first node is a static method, not a constructor. The arrow in the header prior to the name WebRequest indicates a method (Invoke node). You need to place an Invoke node on the block diagram, click on the node and choose "Select class". Then find the namespace and class. Once you do you will be able to select all of the available static methods, of which Create is one.

0 Kudos
Message 13 of 25
(3,352 Views)

Thank you very much. I was racking my brain on how to do this.

 

I will try this and see how it works. Will report back.

0 Kudos
Message 14 of 25
(3,350 Views)

Hi, I was able to to a simple get request. How can one do post request via this method? Also, how can i do https post via ssl utilizing a ca certificate file from the server? 

 

Thank you greatly. 

0 Kudos
Message 15 of 25
(3,344 Views)

You'll need to search around on the net for an example on using .NET to do an HTTPS POST and then you should be able to duplicate the code in LabVIEW. A quick Google turned up this example: http://www.terminally-incoherent.com/blog/2008/05/05/send-a-https-post-request-with-c. Attached is a VI that tries to implement this, but I have no way of testing it, so you'll need to play around with it. 

Message 16 of 25
(3,337 Views)

Hi smercurio_fc,

 

I tried this by substituting the HTTP POST example from http://zone.ni.com/devzone/cda/epd/p/id/3153. It worked although the site responded stating that I didn't put in a location but it shows that the code works and can communicate through my proxy to the website. Fantastic.

 

My only question is how is this doing or how can it do HTTPS? Do I just change HTTP to HTTPS and the .NET code sends a HTTPS POST? How do I incorporate the CA Certificate file that I have from the server vendor?

 

Thank you very much.

0 Kudos
Message 17 of 25
(3,323 Views)

Hi,

 

I am trying to add the CA certificate to teh POST request via this description.

http://msdn.microsoft.com/en-us/library/ff649203.aspx

http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificat...

 

Attached you will find a picture but it is telling me that the X509CertificateCollection is missing a wire or not wired correctly. What am I missing here and am I doing this correctly so that I can do HTTPS POST with a CA Certificate file.

Error from CA Cert Code.jpg

0 Kudos
Message 18 of 25
(3,305 Views)

Can anyone help with this in teh last post?

0 Kudos
Message 19 of 25
(3,278 Views)

Well you have static objects and dynamic objects. Dynamic ones need to be optained by using a constructor.

Rolf Kalbermatter
My Blog
0 Kudos
Message 20 of 25
(3,274 Views)