class
FRestClient
- Module
- GameNet
- Header
#include "GameNet/RestClient.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
explicit FRestClient(std::string baseUrl) | FRestClient |
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetBearerToken | Token management. |
const std::string& | GetBearerToken | |
void | SetOnUnauthorized | Called once when a request returns 401. |
void | AddDefaultHeader | Raw "Name: value" lines sent with every request (client version, locale, device id, ...). |
void | SetTimeoutSeconds | |
FRestResult | Get | |
FRestResult | Post | |
FRestResult | Put | |
FRestResult | Patch | |
FRestResult | Delete |
Function details
FRestClient
C++
explicit FRestClient(std::string baseUrl)SetBearerToken
C++
void SetBearerToken(std::string token)Token management. Empty token = no Authorization header.
GetBearerToken
C++
const std::string& GetBearerToken() constSetOnUnauthorized
C++
void SetOnUnauthorized(std::function<bool()> hook)Called once when a request returns 401. Return true after refreshing the token (via SetBearerToken) to retry the original request once; false passes the 401 through.
AddDefaultHeader
C++
void AddDefaultHeader(std::string headerLine)Raw "Name: value" lines sent with every request (client version, locale, device id, ...).
SetTimeoutSeconds
C++
void SetTimeoutSeconds(long seconds)Get
C++
FRestResult Get(const std::string& path)Post
C++
FRestResult Post(const std::string& path, const std::string& jsonBody = "")Put
C++
FRestResult Put(const std::string& path, const std::string& jsonBody = "")Patch
C++
FRestResult Patch(const std::string& path, const std::string& jsonBody = "")Delete
C++
FRestResult Delete(const std::string& path)Generated from GameNet/RestClient.h via gamenet.json · Oct 26, 2026Version 1.0.0