jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Token authentication Token authentication #80796

    gapfranco
    Participant

    Hi Peter,

    A “hack”? I just followed the documentation:

    beforeSend(jqXHR, settings): A pre-request callback function that can be used to modify the jqXHR

    There is no exemples on usage.

    How can I set a request authorization header using the contentType?
    And how to use this library to access the Twitter API, for exemple, that also requires an Authorization header? For exemple:

    POST /1/statuses/update.json?include_entities=true HTTP/1.1
    Accept: */*
    Connection: close
    User-Agent: OAuth gem v0.4.4
    Content-Type: application/x-www-form-urlencoded
    Authorization: OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", ...
    Content-Length: 76
    Host: api.twitter.com

    There is the Content-Type AND there is the Authorization headers. The question is: How to set that Authorization header?

    Best regards,

    in reply to: Token authentication Token authentication #80782

    gapfranco
    Participant

    Hi Peter,

    But it should, right? I mean, the use of beforeSend is correct? Any ideas on how to debug it? There is no error messages.
    Or must we assume that the request header cannot be set? That would be a show stopper on our use of jqwidgets.

    Best regards,

Viewing 2 posts - 1 through 2 (of 2 total)