I use oauth in the API library, and the API requires that the authorization header be explicitly set for each request.
I am familiar with the setRequestHeader method, using it like:
this.request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
However, I'm not sure how to properly configure the authorization header, since it has so many parameters. An example of what the title should look like:
Authorization: OAuth realm="",oauth_version="1.0",oauth_consumer_key="consumer",oauth_token="foo",oauth_timestamp="timestamp",oauth_nonce="ononce",oauth_signature_method="PLAINTEXT",oauth_signature="osig"
How to properly configure the authorization header in this format using setRequestHeader? Thank!
source
share