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

Re: http_url_get_raw call hangs if web service not available



Hello Rowena,

The code you posted doesn't make much sense to me.  The 
http_url_get_raw() routine performs an HTTP GET request.  GET requests 
do not support POST data, you'd need to use a POST request to send POST 
data.

Here's the parameters you cited:

   HTPrc = http_url_get_raw( HTPPostData
                           : 0
                           : %paddr('HTPINCOMING')
                           : %len(HTPPostData));


The first parameter to http_url_get_raw() is a URL.  But, you are 
passing POST data to it??   HUH??

The second parameter is a numeric identifier (intended for use as a file 
descriptor, but HTTPAPI doesn't do anything with it except pass it to 
your HTPINCOMING subprocedure)...  so 0 works for that.

The third parameter is the subprocedure to call when data arrives over 
the wire.  %paddr('HTPINCOMING') should work fine, assuming HTPINCOMING 
has been written properly.

The fourth parameter is a timeout.  You are passing the length of a 
string to it.  Apparently, if your string is 50 chars long, you want 
HTTPAPI to time-out after 50 seconds.  But if your string is 2000 chars 
long, you want to wait 2000 seconds (33 minutes.)

Like I said... this doesn't make much sense.


On 12/1/2011 8:01 AM, Rowena Stanley wrote:
>
> Our call to http_url_get_raw does not return a value if the web
> service is not available.  Is there a way to get it to return an
> error? Here is the call:
>
>     HTPrc = http_url_get_raw( HTPPostData: 0:
>       %paddr('HTPINCOMING'): %len(HTPPostData));
 >
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------