Page 1 of 1

http_post using REST

Posted: Wed Sep 21, 2016 8:15 pm
by HOLMRICK@GMAIL.COM
I need to post an xml file to a Web Service using REST and I need to supply a user id and password. Using HTTPAPI, I can get my XML edited by the Web Service server but then I get back a "HTTP/1.1 422 Unprocessable Entity" in the debug log.

I would like to use one of the http_post apis, but I have not been able to find an example that shows supplying the user id and password and using REST. So I tried using HTTP_SetAuth(HTTP_AUTH_BASIC:UserId:Pass) and then followed by http_post_stmf api with my xml file. After trying to post the file, I get HTTP/1.1 415 Unsupported Media Type. It seems like I now need to supply the content type parameter to tell the server I am sending xml or maybe I should be using http_post_xml.

Thanks for any guidance.

Rick Holm

Re: http_post using REST

Posted: Thu Sep 22, 2016 5:03 am
by Scott Klement
You can get free (community) support for HTTPAPI from the HTTPAPI/FTPAPI mailing list, which you can subscribe to here:
http://scottklement.com/mailman/listinfo/ftpapi

You can get paid/commercial support from Profound Logic by purchasing a support contract. To get a quote e-mail sales@profoundlogic.com