How to set request headers through JavaScript?

L

liamgegan

Short answer: you can't

Not so short answer: You can't explicitly set the request header using
only javascript. You'll need to refer to the documentation of your
transport mechanism to do so.

Can you give us more details of what you're trying to do than the OP?
 
M

MohsinHijazee

Short answer: you can't

Not so short answer: You can't explicitly set the request header using
only javascript. You'll need to refer to the documentation of your
transport mechanism to do so.

Can you give us more details of what you're trying to do than the OP?

Actually I am working on a Rails application that exposes its REST
API. In other to utilize that API,
the Authorization header would be set to a digital signature. For that
case, we should be able to set the
HTTP headers. Can we do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top