Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create HTTP Request object
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01645753
Message ID:
01645870
Views:
98
Hi Dmitry,

wwhttp has a property called cExtraheaders where you can add additional header- data.
this.oHTTP.cExtraHeaders = "accept:application/json" + CHR(13) + CHR(10) ;
       + "Authorization:Bearer" + this.cToken  + CHR(13) + CHR(10)
In this example this adds a line for the data-format needed and a line to send a token (Session-ID).
But in most HTTP-Services the authorisation is done by either using POST like
cContent = "{ " + Chr(34) + "username" + Chr(34) + " : " + Chr(34) + this.cUser + Chr(34) + ", " + Chr(34) + "password" + Chr(34) + " : " + Chr(34) + this.cPasswort + Chr(34) + "}"
this.oHTTP = CREATEOBJECT("wwhttp")
this.oHTTP.AddPostKey(cContent)
or as also mentioned before by using a GET with added parameters like:
cHttp = this.cUrl + "Login?anmeldename=" + this.cUser + "&passwort=" + this.cPasswort
cResult = this.oHTTP.HTTPGet(cHttp) 
Best regards

Thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform