I'm trying to post to a rest instance, but the instance requires application/xml mimetype to be specified. I don't seem to be able to do this using postnettext.
my code is of the form
mime = "application/xml"
netid1 = postnettext( "http://10.238.49.5/restapi", xml_job_text, "Windows", mime)
which comes back with a netdone of true and a neterror of "" (no text at all). The job submission is ignored. Any thoughts as to what stupid thing I'm doing wrong?
Try using a packet sniffet (like WireShark) to examine data that is sent from your machine when making a POST. I expect that the MIME type is being ignored, or defaults to "application/x-www-form-urlencoded" instead of
Have a look at Valentin Schmidt's HTTP class that uses the MU xtra for web-related integration and would, I expect, provide the ability to set the MIME type when POSTing