Raised This Month: $23 Target: $400
 5% 

Posting via HTTP methods?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yusufali
Member
Join Date: Feb 2014
Old 12-03-2014 , 00:11   Posting via HTTP methods?
Reply With Quote #1

How would one be able to post data using steamtools?

Here is what i have so far

Code:
HTTPRequestHandle hndl = Steam_CreateHTTPRequest(HTTPMethod:HTTPMethod_POST, "http://someurl.php");
but how would i post data to the url? I know i can hard code it using
Code:
"http://someurl.php?var=3&var2=4"
But what is a more robust way of achieving this?
__________________
yusufali is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-03-2014 , 05:53   Re: Posting via HTTP methods?
Reply With Quote #2

There is no way to specify GET (in URL) params for a POST request with the SteamWorks interface.
Any API that requires a POST really should support including any GET params in with the request body.
You also don't need to re-tag the HTTPMethod.
__________________

Last edited by asherkin; 12-03-2014 at 05:54.
asherkin is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-03-2014 , 14:18   Re: Posting via HTTP methods?
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
Any API that requires a POST really should support including any GET params in with the request body.
You also don't need to re-tag the HTTPMethod.
It's not required and could be security violation to do that depending on what the form does.
__________________
Am I back? Well, we'll see.
Powerlord is offline
yusufali
Member
Join Date: Feb 2014
Old 12-03-2014 , 16:11   Re: Posting via HTTP methods?
Reply With Quote #4

from reading the steamtools.inc
so if I try something like this:

Code:
HTTPRequestHandle hPost = Steam_CreateHTTPRequest(HTTPMethod_POST, "http://someurl.php")
setHTTP_param( hPost, "action", "some value" )
Steam_SendHTTPRequest( hPost, callback )
this will not work as a correct way to post data to a url?
__________________
yusufali is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:10.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode