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

http_header



   Hello,


   I'm having a little trouble with the http_header function, and just
   wanted to check that I'm using it correctly.  I'm currently using
   v1.23, but will upgrade in case this might be the issue.


   I've been using the HTTP APIs successfully for years with SOAP
   webservices, but I now have to start consuming a RESTful webervice.
   The service in question appears quite simple where I would POST some
   data that needs checking, and the service will then pass back the URL
   that I would need to run a subsequent GET against to receive the
   results.  The URL is passed back in the header however, and I just
   can't seem to pick it up.


   From the debug log, it appears that the initial post is successful and
   I can see the URL begin returned:


   Protocol Used: TLS Version 1

   http_persist_post(): entered

   http_long_ParseURL(): entered

   do_post(): entered

   POST /query/EmailValidate/1.0/ HTTP/1.1

   Host: api.experianmarketingservices.com

   User-Agent: http-api/1.23

   Content-Type: text/xml

   Expect: 100-continue

   Content-Length: 36

   Auth-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx



   recvresp(): entered

   HTTP/1.1 100 Continue



   SetError() #13: HTTP/1.1 100 Continue

   senddoc(): entered

   <Email>xxxxxxxxxxxx</Email>


   recvresp(): entered

   HTTP/1.1 204 No Content

   Cache-Control: no-store, must-revalidate, no-cache, max-age=0

   Pragma: no-cache

   Content-Length: 0

   Content-Location:
   https://api.experianmarketingservices.com/result/EmailValidate/1.0/xxxx
   xxxxxxxxxxxxxxxx

   Expires: Mon, 01 Jan 0001 00:00:00 GMT

   Date: Tue, 20 Jan 2015 10:06:54 GMT



   SetError() #13: HTTP/1.1 204 No Content

   http_close(): entered




   I've altered some of the values to xxxxx.  TheURL I need to pick up is
   under "Content-Location", so in my code directly after the
   http_url_post I've used the line wkNewLoc =
   http_header(`Content-Length'); however wkNewLoc is blank.  I've tried
   with and without the colon after content-length but neither work.


   The return code is "204" as there is no content to be returned (so my
   response file is blank) - would this affect the http_header api?
   Having searched the archive I've read that a Content-Length of 0
   shouldn't affect this however.


   Any help would be very welcome.


   Thanks,


   James



   James Viney

   IT Development Team Leader

   Ageas Insurance Limited

   IT Department

   Tel: +44 (0)23 8031 3324

   [1]james.viney@xxxxxxxxxxx

   Ageas House, Hampshire Corporate Park, Templars Way, Eastleigh,
   Hampshire, SO53 3YA England


   [2]www.ageas.co.uk

     __________________________________________________________________

   Proud partner of The Ageas Bowl and the Ageas Salisbury International
   Arts Festival.
   Registered Address: Ageas House, Hampshire Corporate Park, Templars
   Way, Eastleigh, Hampshire, SO53 3YA Registered Number: 354568 England
   Authorised by the Prudential Regulation Authority and regulated by the
   Financial Conduct Authority and the Prudential Regulation Authority
   This e-mail together with any attachments are intended for the
   addressee only and may be private and confidential. If you are not the
   intended recipient, or the person responsible for delivering it to the
   intended recipient, you must not open any attachments, or copy,
   disclose, distribute, retain or use this e-mail, including any
   attachments, in any way whatsoever; please return it to us immediately
   using the reply facility on e-mail.
   Consider the environment and think before you print this email.

References

   1. mailto:james.viney@xxxxxxxxxxx
   2. http://www.fortisinsurance.co.uk/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------