login about faq

I have OAuth working using CURL in another app and am trying to port the code over to Chilkat. I'm not using your OAuth sample code as I have an embedded browser and can get an auth_token for the user to update their own status after loggin in. I am generating my own header am attempting to use something like this:

http.SetRequestHeader('Authorization','OAuth oauth_consumer_key="xxxxxx", oauth_nonce="xxxxx", oauth_signature="xxxxx", oauth_signature_method="HMAC-SHA1", oauth_timestamp="xxxxx", oauth_token="xxxxx", oauth_version="1.0"')

And then using your standard http.SynchronousRequest(domain,port,ssl,req) code from the examples.

I know my generated header and tokens are all correct as it works with CURL, so my question is can I set the header using that method?

asked Dec 06 '12 at 18:51

jamesblake's gravatar image


SetRequestHeader is for methods the send HTTP requests but do not use an HttpRequest object (such as QuickGetStr). The SynchronousRequest method's last argument is an HttpRequest object. You would set the header field within the HttpRequest object by calling req.AddHeader.


answered Dec 07 '12 at 10:57

chilkat's gravatar image

chilkat ♦♦

Excellent. It worked. Thanks.


answered Dec 07 '12 at 12:39

jamesblake's gravatar image


Can you use AddCustomHeader the same way when using the Upload object instead of the HTTPRequest? I swapped things out for this one and changed the method but no luck.


answered Jan 21 '13 at 05:43

jamesblake's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 06 '12 at 18:51

Seen: 1,284 times

Last updated: Jan 21 '13 at 05:43

powered by OSQA