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.
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?
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.
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.
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.
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.
I am trying to add the CA certificate to teh POST request via this description.
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.