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

RE: Debug View of HTTP Headers



You can debug the httpapir4 service program looking for all the header related outputs but there is not one "single header" that will show what is going to be sent.
 
Based on your code snippet, I created a working example. Below is the line from my debug. Not sure why you can't find it in your debug. No problem with what you did except you did not "add a cookie". You added an additional header (which looks like a cookie and should work fine? for what you want to do).

Cookie: authToken=ABCDEfghij

Maybe OurToken doesn't really have a length so then the Cookie line is not added to the header?


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Stephen Coyle
Sent: Wednesday, May 07, 2014 1:25 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Debug View of HTTP Headers

Hi All,

I have been requested to add a cookie into the HTTP header before a POST.
The repsonse I receive is that the cookie is not found.
Is there any way to view the header in debug before executing the POST?
I have set http_debug(*ON) but do not see the name of the cookie in the resuting file..

Thanks in advance for any help.
Much appreciated.

- Steve

The code is below:

http_xproc(HTTP_POINT_ADDL_HEADER
          :%paddr('ADDL_HDR'))  ;

P addl_hdr        B

D addl_hdr        PI
D   addl_data                 1024A   varying

 /free

     if %len(OurToken) > 0  ;
         addl_data = 'Cookie: authToken=' + OurToken + x'0d25' ;
     else ;
         addl_data = '' ;
     endif ;

 /end-free

P                 E
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------