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:
01645876
Views:
41
>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

Hi Thomas,

I just replied to Antonio Lopes and cc you on it. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform