[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_url_post_xml
Here's what I use...gratefully stolen from Scott! :) It's in one of
the sample programs I think.
// data is a string that contains the XML document. It's a big field.
D enc s like(HTTP_URL_ENCODER)
D encoded_data S *
D encoded_len S 10I 0
// URL encode the data.
enc = http_url_encoder_new();
http_url_encoder_addvar_s(enc: 'qf': 'xml');
http_url_encoder_addvar( enc
:'xmluser'
: %addr(data)
: %len(%trimr(data)) );
// Get a pointer to the URL encoded data.
http_url_encoder_getptr( enc
: encoded_data
: encoded_len);
// Post the data to the server.
nextpos = 1; // Reset nextpos position.
rc = http_url_post_raw(
'https://theserver.com/integrate.aspx'
: encoded_data
: encoded_len
: 1
: %Paddr('INCOMING')
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'application/x-www-form-urlencoded');
On Thu, Oct 16, 2008 at 12:42 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
> Are you encoding your data via the "Webform" or "URL Encoder" routines?
>
> If you are already doing that, and it still causes the post to fail, can
> you show me what that part of your code looks like, and how to reproduce
> the failure?
>
> John Clark(Hotmail) wrote:
>> I am using http_url_post_xml to send name/value pairs(separated by an
>> ampersand) to a service provider. There have been instances when an %
>> or & have been part of the data being sent. This seems to make the
>> post fail.
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------