PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 23 → HTTP Request Header Syntax
HTTP Request Header Syntax
Débuté par Phil Boardman, 13 nov. 2018 18:09 - 1 réponse
Posté le 13 novembre 2018 - 18:09
Hi Everyone

I was wondering if anyone knows the proper syntax for adding information to HTTP Headers in Windev.

I am trying to use OAuth 1.0a, I can't use OAuth 2.0 unfortunately although i know it is supported in Windev 23.

I know the OAuth details need to be within the Authorization Header so i am doing the following...

//Create The Authorization Header String
sAuth is string = [
oauth_consumer_key="!XCONSUMERKEYX!",
oauth_nonce="!XGUIDX!",
oauth_signature="!XSIGNATUREX!",
oauth_signature_method="RSA-SHA1"
oauth_timestamp="!XTIMESTAMPX!",
oauth_token=""
]

//Create The HTTP Request
cMyRequest is httpRequest
cMyRequest.Header["Authorization"] = sAuth //Add The OAuth Details To The Authorization Header

Does this look correct to you? I just want to make sure my issue is with OAuth and not the way i am passing these parameters. Any additional help with OAuth 1.0a would also be appreciated.

Thanks in advance.

Phil.
Posté le 16 novembre 2018 - 17:43
Have figured out that is is correct now, the problem was the content of the header, not the syntax i was using.