[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML POST



Hmmm...I'm getting an error back from a trading partner for a new test
application I'm putting together. According to their docs, the POST
string should look like:

POST
When using the POST method, make sure that you include the following
Request Headers in
your POST:
􀂃 http_request.setRequestHeader(ʺContent‐typeʺ,
ʺapplication/x‐www‐form‐urlencodedʺ);
􀂃 http_request.setRequestHeader(ʺContent‐lengthʺ, parameters.length);
􀂃 http_request.setRequestHeader(ʺConnectionʺ, ʺcloseʺ);
Be sure to substitute your actual parameter length.
POST qf=xml&xml=xxx
Replace xxx with the URL‐encoded XML that the API is to execute.

And here's my HTTPAPI code:

          CallP http_xproc(HTTP_POINT_ADDL_HEADER:
                           %paddr('CONNCLOSE'));

          rc = http_url_post_raw(
                'https://thathost.com/thatapi.aspx?qf=xml&xml='
                : %Addr(Data)
                : %Len(%TrimR(Data))
                : 1
                : %Paddr('INCOMING'));

The Data value looks correct. I'm not sure about the "qf=xml&xml= "
string. Do I put that in the Data variable? Do I put in in the URL?

Thanks!
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------