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

Re: [Ftpapi] Send api key in header



It may better help you to understand how HTTP headers are created and sent, by checking this small section "General format" :

https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#General_format

It's my understanding that the only thing that separates headers from the body of a HTTP request is that "empty line" / "two consecutive CR-LF pairs".

Each time you add a header manually, you should end it with a CR-LF. Your  HTTP_POINT_ADDL_HEADER can specify multiple headers, each terminated with a CR-LF.

On Tue, 11 May 2021 at 16:23, Marçal Montana - ISOLANA L'HOSPITALET <mmontana@xxxxxxxxxx> wrote:

In case it can be useful to someone

 

After trying to use all the HTTP_setAuth options (and the http_xproc HTTP_POINT_ADDL_HEADER option) and the server returns the 500 error I found the way.

 

It may not be the best ... but it works.

 

http_setAuth (HTTP_AUTH_USRDFN

            : CRLF + 'ApiKey:'

: '[apiKeyValue');

 

I add a CRLF before the value and ':' in ApiKey. With this, the server understands the header sent.

 


-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi