engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
FGenericPlatformHttp类 参考

Platform specific Http implementations Intended usage is to use FPlatformHttp instead of FGenericPlatformHttp 更多...

#include <GenericPlatformHttp.h>

+ 类 FGenericPlatformHttp 继承关系图:

静态 Public 成员函数

static IHttpRequest * ConstructRequest ()
 Creates a new Http request instance for the current platform 更多...
 
static FHttpManager * CreatePlatformHttpManager ()
 Creates a platform-specific HTTP manager. 更多...
 
static FString GetDefaultUserAgent ()
 Returns the default User-Agent string to use in HTTP requests. 更多...
 
static FString GetMimeType (const FString &FilePath)
 Get the mime type for the file 更多...
 
static TOptional< FString > GetOperatingSystemProxyAddress ()
 Get the proxy address specified by the operating system 更多...
 
static FString GetUrlDomain (const FStringView Url)
 Returns the domain portion of the URL, e.g., "a.b.c" of "http://a.b.c:d/e" 更多...
 
static FString GetUrlDomainAndPort (const FStringView Url)
 Returns the domain and port portion of the URL, e.g., "a.b.c:d" of "http://a.b.c:d/e" 更多...
 
static TOptional< FString > GetUrlParameter (const FStringView Url, const FStringView ParameterName)
 Extract the URL-Decoded value of the specified ParameterName from Url. 更多...
 
static FString GetUrlPath (const FStringView Url, const bool bIncludeQueryString=false, const bool bIncludeFragment=false)
 Extract the Path portion of a URL, optionally including the Query String, and optionally including the Fragment (when also including the query string.) The return value will always contain a leading forward slash, even if no path is found. 更多...
 
static TOptional< uint16 > GetUrlPort (const FStringView Url)
 Extract the Port part of a URL, or an unset object if there was non specified. 更多...
 
static FString HtmlEncode (const FStringView UnencodedString)
 Returns the < &gt...etc encoding for strings between HTML elements. 更多...
 
static void Init ()
 Platform initialization step
 
static bool IsOperatingSystemProxyInformationSupported ()
 Check if getting proxy information from the current operating system is supported Useful for "Network Settings" type pages. 更多...
 
static TOptional< bool > IsSecureProtocol (const FStringView Url)
 Check the protocol of the provided URL to determine if this is for a secure connection (HTTPS, WSS, etc) 更多...
 
static bool IsURLEncoded (const TArray< uint8 > &Payload)
 Helper function for checking if a byte array is in URL encoded format.
 
static void Shutdown ()
 Platform shutdown step
 
static FString UrlDecode (const FStringView EncodedString)
 Returns a decoded version of the percent-encoded passed in string 更多...
 
static FString UrlEncode (const FStringView UnencodedString)
 Returns a percent-encoded version of the passed in string 更多...
 
static bool UsesThreadedHttp ()
 Check if a platform uses the HTTP thread 更多...
 

详细描述

Platform specific Http implementations Intended usage is to use FPlatformHttp instead of FGenericPlatformHttp

成员函数说明

◆ ConstructRequest()

static IHttpRequest * FGenericPlatformHttp::ConstructRequest ( )
static

Creates a new Http request instance for the current platform

返回
request object

◆ CreatePlatformHttpManager()

static FHttpManager * FGenericPlatformHttp::CreatePlatformHttpManager ( )
inlinestatic

Creates a platform-specific HTTP manager.

返回
nullptr if default implementation is to be used

◆ GetDefaultUserAgent()

static FString FGenericPlatformHttp::GetDefaultUserAgent ( )
static

Returns the default User-Agent string to use in HTTP requests.

Requests that explicitly set the User-Agent header will not use this value.

返回
the default User-Agent string that requests should use.

◆ GetMimeType()

static FString FGenericPlatformHttp::GetMimeType ( const FString &  FilePath)
static

Get the mime type for the file

返回
the mime type for the file.

◆ GetOperatingSystemProxyAddress()

static TOptional< FString > FGenericPlatformHttp::GetOperatingSystemProxyAddress ( )
static

Get the proxy address specified by the operating system

返回
optional FString: If unset: we are unable to get information from the operating system. If set: the proxy address set by the operating system (may be blank)

◆ GetUrlDomain()

static FString FGenericPlatformHttp::GetUrlDomain ( const FStringView  Url)
static

Returns the domain portion of the URL, e.g., "a.b.c" of "http://a.b.c:d/e"

参数
Urlthe URL to return the domain of
返回
the domain of the specified URL

◆ GetUrlDomainAndPort()

static FString FGenericPlatformHttp::GetUrlDomainAndPort ( const FStringView  Url)
static

Returns the domain and port portion of the URL, e.g., "a.b.c:d" of "http://a.b.c:d/e"

参数
Urlthe URL to return the domain and port of
返回
the domain and port of the specified URL

◆ GetUrlParameter()

static TOptional< FString > FGenericPlatformHttp::GetUrlParameter ( const FStringView  Url,
const FStringView  ParameterName 
)
static

Extract the URL-Decoded value of the specified ParameterName from Url.

An unset return means the parameter was not present in Url, while an empty value means it was present, but had no value.

参数
UrlThe URL to parse for ParameterName
ParameterNameThe parameter name to look for
返回
If ParameterName was found, the string value of its value (in URL Decoded format), otherwise the return value is unset

◆ GetUrlPath()

static FString FGenericPlatformHttp::GetUrlPath ( const FStringView  Url,
const bool  bIncludeQueryString = false,
const bool  bIncludeFragment = false 
)
static

Extract the Path portion of a URL, optionally including the Query String, and optionally including the Fragment (when also including the query string.) The return value will always contain a leading forward slash, even if no path is found.

If bIncludeFragment is set true, bIncludeQueryString must also be true

参数
UrlThe URL to parse for a Path
bIncludeQueryStringinclude the URL's query string in the return value (if one is found)
bIncludeFragmentinclude the URL's fragement in the return value (if one is found)

◆ GetUrlPort()

static TOptional< uint16 > FGenericPlatformHttp::GetUrlPort ( const FStringView  Url)
static

Extract the Port part of a URL, or an unset object if there was non specified.

Example: "http://example.org:23/" would return 23, while "https://example.org/" would return an unset object

参数
UrlThe URL to parse for a Port

◆ HtmlEncode()

static FString FGenericPlatformHttp::HtmlEncode ( const FStringView  UnencodedString)
static

Returns the < &gt...etc encoding for strings between HTML elements.

参数
UnencodedStringThe unencoded string to convert to html encoding.
返回
The html encoded string

◆ IsOperatingSystemProxyInformationSupported()

static bool FGenericPlatformHttp::IsOperatingSystemProxyInformationSupported ( )
static

Check if getting proxy information from the current operating system is supported Useful for "Network Settings" type pages.

GetProxyAddress may return an empty or populated string but that does not imply the operating system does or does not support proxies (or that it has been implemented here)

返回
true if we are able to get proxy information from the current operating system, false if not

◆ IsSecureProtocol()

static TOptional< bool > FGenericPlatformHttp::IsSecureProtocol ( const FStringView  Url)
static

Check the protocol of the provided URL to determine if this is for a secure connection (HTTPS, WSS, etc)

参数
TheURL to check for a scheme
返回
True if secure, false if insecure, unset if unknown

◆ UrlDecode()

static FString FGenericPlatformHttp::UrlDecode ( const FStringView  EncodedString)
static

Returns a decoded version of the percent-encoded passed in string

参数
EncodedStringThe percent encoded string to convert to string
返回
The decoded string

◆ UrlEncode()

static FString FGenericPlatformHttp::UrlEncode ( const FStringView  UnencodedString)
static

Returns a percent-encoded version of the passed in string

参数
UnencodedStringThe unencoded string to convert to percent-encoding
返回
The percent-encoded string

◆ UsesThreadedHttp()

static bool FGenericPlatformHttp::UsesThreadedHttp ( )
static

Check if a platform uses the HTTP thread

返回
true if the platform uses threaded HTTP, false if not

该类的文档由以下文件生成: