How to send http parameters

Just starting out? Need help? Post your questions and find answers here.
debkosmonaut
Posts: 4
Joined: Sat Jun 02, 2018 4:22 pm

How to send http parameters

Post by debkosmonaut »

Hi, would like an example on how to send the GET or POST parameters on an http request in spiderbasic.
I understand that to send the type post or get I have to use #PB_HTTP_Get or its counterpart. My question is where I actually put the "user=debk", "pass=mypass" or whatever other parameters on the function.

Thanks.
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: How to send http parameters

Post by Paul »

Code: Select all

Procedure HttpGetEventLogin(Success,Result$,UserData)
  If Success
    ;response from server
    Else
    ;error
  EndIf   
EndProcedure


HTTPRequest(#PB_HTTP_Post, "../cgi-bin/login.cgi", "user=username&pass=password", @HttpGetEventLogin())
The help file explains this pretty good.
debkosmonaut
Posts: 4
Joined: Sat Jun 02, 2018 4:22 pm

Re: How to send http parameters

Post by debkosmonaut »

Paul,
I don't find that code on the help file nor in the example.

Thank you very much.
JD
Post Reply