[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_header
Is the name of the procedure READ_HDR (as you have it enclosed in
quotes) or Read_Hdr?
On Wed, Jan 21, 2015 at 4:14 AM, James Viney
<[1]James.Viney@xxxxxxxxxxx> wrote:
I've tried with and without colon, and all upper and all lower case
but, when I debug, the value of wkNewLoc is always blank.
I've also tried using the
http_xproc(HTTP_POINT_PARSE_HEADER:%paddr('READ_HDR')), but for some
reason it never escapes to my Read_Hdr subprocedure.
-----Original Message-----
From: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: 21 January 2015 02:24
To: HTTPAPI and FTPAPI Projects
Subject: Re: http_header
There should be no colon...
� � � wkNewLoc = http_header('content-location');
-SK
On 1/20/2015 12:59 PM, Mike Krebs wrote:
> Maybe you are looking for
> wkNewLoc = http_header('Content-Location:'); ?
>
> -----Original Message-----
> From: [4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:[5]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of James
> Viney
> Sent: Tuesday, January 20, 2015 4:21 AM
> To: '[6]ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: 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: [7]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:
>
[8]https://api.experianmarketingservices.com/result/EmailValidate/1.0/x
xx
> xxxxxxxxxxxxxxxxx
> 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
> [9]james.viney@xxxxxxxxxxx<mailto:[10]james.viney@xxxxxxxxxxx>
> Ageas House, Hampshire Corporate Park, Templars Way, Eastleigh,
> Hampshire, SO53 3YA England
>
> [11]www.ageas.co.uk<[12]http://www.fortisinsurance.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.
>
----------------------------------------------------------------------
> - This is the FTPAPI mailing list.� To unsubscribe, please go to:
> [13]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
> -
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.� To unsubscribe, please go to:
[14]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.� To unsubscribe, please go to:
[15]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
References
1. mailto:James.Viney@xxxxxxxxxxx
2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
6. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
7. http://api.experianmarketingservices.com/
8. https://api.experianmarketingservices.com/result/EmailValidate/1.0/xxx
9. mailto:james.viney@xxxxxxxxxxx
10. mailto:james.viney@xxxxxxxxxxx
11. http://www.ageas.co.uk/
12. http://www.fortisinsurance.co.uk/
13. http://www.scottklement.com/mailman/listinfo/ftpapi
14. http://www.scottklement.com/mailman/listinfo/ftpapi
15. 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
-----------------------------------------------------------------------