12-01-2016 10:05 AM
I want to post data to a HTTP site using TestStand. I have managed to do that by using the System.Net.Http.dll. However it seem to be a bit to complicated. The problem is that correct media type (in this case "application/x-www-form-urlencoded") of the message content must be set using an Object Reference. It is possible to do that in a rather complicated way by creating a Request Message and use the Request Message header to set the media type. After that adding the content to the Request Message and finally Post the Request Message.
Is there an easier way to do thet using the System.Net.Http.dll or is there another component that makes it simpler ?
Ofcourse there is other ways to do this by for example use a script langauage but it would be rather nice if there is some component for this that is easy to integrate with TestStand.
12-01-2016 03:05 PM
i have been able to post data to https://emoncms.org/ with labview assuming is a standard post & get request.. I did this...
is this what you are looking for?
12-06-2016 08:28 AM
Not exactly. I can do what I need to do for the moment by using the common .NET component "System.Net.Http.dll". Geting data using the .NET component is simple. Posting data is much more complicated, becouse it need to know the HTTP text encoding format (media type).
My question is if I have missed some simple method for that component?
There is a simple POST method that takes a string content, but becouse it must need to know the HTTP text encoding format (media type) and that is passed as an object reference it gets a little bit to complicated.