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

Re: [Ftpapi] content-type header problem



Hi,

Correct, http_setOption() works together with http_req, http_stmf and http_string.  It does not work with the old deprecated routines like http_url_post_raw.  For those old-school routines, you need to pass it in the content type parameter to the routine.

-- 
Scott Klement
sk@xxxxxxxxxxxxxxxx

On 4/9/2021 11:37 AM, Brian Garland wrote:
I encountered a problem with the wrong content type being passed in the HTTP headers.  This was with an older version and the latest version downloaded today.   

I had this in my code:
http_setOption('content-type':'application/json');          

The debug log consistently showed:
Content-Type: text/xml

I was using the http_url_post_raw() procedure.  


Just as a guess, I decided to try http_req() with its content-type parameter and remove the call to http_setOption().  This test worked fine.  


So, does http_setOption() not work with http_url_post_raw() or did I do something else wrong?  


By the way, with the 1.42 download from your website it says 1.43 in the debug log as the version


--
Brian J. Garland
Vermont Information Processing, Inc.


This email and any files transmitted with it are confidential and intended solely for the use of the individual or company to whom they are addressed. Do not disclose, distribute, or copy this email to others outside your company. If you have received this email in error, please notify the sender immediately and delete this email from your system.
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi