Unreal Engine Plugin
HTTP Client
HTTP client for Unreal Engine: Blueprint nodes, events and C++ usage with the Internet Protocol plugin.
References
#include "http/httpclient.h"
How to use
Blueprint: search by GetInternetProtocolSubsystem and call CreateHttpClient function
C++: Use the code bellow
#include "http/httpclient.h"
UHttpClient* client = NewObject<UHttpClient>();Variables
Idle Timeout Seconds
- Set/Get timeout value in seconds
Idle Timeout Seconds
Use Tls
- New in 4.0. Encrypts the connection with TLS. With no
Set Tls Optionscall, the secure default options are used. - Applies to the next connection.
Use Tls
Max Redirects
- New in 4.0. Follows up to this many redirects (
301,302,303,307,308) on the same host. A303, or a redirectedPOST, becomes aGET. Default0: redirects are delivered as responses.
Max Redirects
Functions
Is Open
- Return true if socket is open.
Is Open
Return Value
Set Host
- Set address and port to resolve. Must be called before use 'Request' function.
- Since 4.0, setting another host cancels the in-flight and queued requests: their callbacks receive
Operation cancelled.
Set HostTarget is Http Client
Target
Bind Opts
Request
- Process payload and send request.
- Requests are queued and sent one at a time over a single keep-alive connection, which is opened automatically when needed. You can call
Requestseveral times in a row. - The callback fires exactly once per request: with the response, or with an
Error Codeif the connection fails, the response is malformed, the connection is closed orCloseis called. - For
HEADrequests the response never has a body, whatever its headers say. - Since 4.0:
- It returns the request id, used by
CancelandOn Progress. Timeout Secondsin the request fails it withOperation timed outwhen the response does not arrive in time.- Binary bodies go in
Body Bytes, and repeated headers (severalSet-Cookie...) inHeader List. See HTTP Request. - Interim
1xxresponses (100,103...) are skipped. - An idempotent request whose reused keep-alive connection closed before any response byte is sent again once, on a new connection.
- It returns the request id, used by
RequestTarget is Http Client
Target
Request
Callback
Return Value
On RequestCustom Event
Error Code
Response
Close
- Close the underlying socket and stop listening for data on it. Also can be used to force cancel the request process: every queued request receives its callback with an error.
CloseTarget is Http Client
Target
Set Url
- New in 4.0. Sets the host from a URL,
http://host[:port]/...orhttps://(TLS is chosen from the scheme). The path is not used: setPathin each request.
Set UrlTarget is Http Client
Target
Url
Return Value
Cancel
- New in 4.0. Cancels a queued or in-flight request: its callback receives the
Operation cancellederror. Returns false if the id is unknown.
CancelTarget is Http Client
Target
Request Id
Return Value
Set Tls Options
- New in 4.0. Turns TLS on with these options. See Security Context Options.
- The server certificate is verified with these options.
- Applies to the next connection.
Set Tls OptionsTarget is Http Client
Target
Sec Opts
Events
On Progress
- New in 4.0. Download progress of the current request, about every 64 KiB: bytes received and the
Content-Length(-1if unknown).
Bind Event to On Progress
Target
Event
On ProgressCustom Event
Request Id
Bytes Received
Total Bytes