Raised This Month: $51 Target: $400
 12% 

Solved SteamWorks Sending Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dangerlord63
Senior Member
Join Date: Aug 2011
Old 04-15-2020 , 21:53   SteamWorks Sending Request
Reply With Quote #1

Hi,

i want to send a request using steamworks and if that request fails, i want to send it again.
is there any way to get url that we setted in SteamWorks_CreateHTTPRequest function.

i mean;
PHP Code:
public GetReq(...){
    
char sRequest[256];
    
FormatEx(sRequestsizeof(sRequest), "blablabla",...);
    new 
Handle:hRequest SteamWorks_CreateHTTPRequest(k_EHTTPMethodGETsRequest);
    if (!
hRequest || !SteamWorks_SetHTTPCallbacks(hRequestOnTransferComplete) || !SteamWorks_SendHTTPRequest(hRequest)){
        
CloseHandle(hRequest);
    }
}

public 
OnTransferComplete(Handle:hRequestbool:bFailurebool:bRequestSuccessfulEHTTPStatusCode:eStatusCode){
    if (!
bFailure && bRequestSuccessful && eStatusCode == k_EHTTPStatusCode200OK){
        
SteamWorks_GetHTTPResponseBodyCallback(hRequestAPIWebResponse);
    }else{
        new 
Handle:hRequest SteamWorks_CreateHTTPRequest(k_EHTTPMethodGET, ????????);
        if (!
hRequest || !SteamWorks_SetHTTPCallbacks(hRequestOnTransferComplete) || !SteamWorks_SendHTTPRequest(hRequest)){
            
CloseHandle(hRequest);
        }
    }

    
CloseHandle(hRequest);

what am i going to call to get last url





*****************
Edit : There is no option to get last url. Need to store in variable...

Last edited by dangerlord63; 04-17-2020 at 15:11.
dangerlord63 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-16-2020 , 08:39   Re: SteamWorks Sending Request
Reply With Quote #2

No, there isn't - you'd need to store it yourself.
__________________
asherkin is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 04-16-2020 , 11:02   Re: SteamWorks Sending Request
Reply With Quote #3

excellent
is there any way to make this request Synchronously?
dangerlord63 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-16-2020 , 11:24   Re: SteamWorks Sending Request
Reply With Quote #4

Quote:
Originally Posted by dangerlord63 View Post
excellent
is there any way to make this request Synchronously?
No - that would be very bad for the server functioning correctly.
__________________
asherkin is offline
Reply



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 18:53.


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