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

How to send http parameters

by debkosmonaut Sat Jun 02, 2018 4:42 pm

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: 35
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada

Re: How to send http parameters

by Paul Sat Jun 02, 2018 6:22 pm

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: 2
Joined: Sat Jun 02, 2018 4:22 pm

Re: How to send http parameters

by debkosmonaut Sat Jun 02, 2018 8:30 pm

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

Thank you very much.
JD
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 7 guests