Page 2 of 2
Re: Add custom headers to HTTPRequest
Posted: Fri Dec 02, 2016 4:11 pm
by SparrowhawkMMU
Many, many thanks Fred, got my API and SB front end talking to one another using auth tokens passed to the backend using the Authorization header
(I'm now also able to pass the
X-Clacks-Overhead header which I try to add to all my front and backends where possible)
Re: Add custom headers to HTTPRequest
Posted: Fri Dec 02, 2016 4:14 pm
by SparrowhawkMMU
Just as an aside for others using this feature, you need to check the OPTIONS request first and ensure that you reply with the correctly configured Access-Control-Allow-Origin and Access-Control-Allow-Headers headers for this to work.
Your browser will only send the actual GET or POST request if it gets the all clear fro the OPTIONS request first
Re: Add custom headers to HTTPRequest
Posted: Thu Jan 05, 2017 7:36 am
by sculptorsjb
hi
The general gist of these posts suggest the problem of setting headers has been solved
but i Can't see how ? and the help file doesn't seem to explain how to use them.
so newby question
how do i set a custom header ?
cheers
steve
Re: Add custom headers to HTTPRequest
Posted: Thu Jan 05, 2017 2:42 pm
by Fred
Your can check the doc, there is an example with custom headers:
http://www.spiderbasic.com/documentatio ... quest.html