Navigation
API > API/Runtime > API/Runtime/HTTP > API/Runtime/HTTP/FHttpRequestAdapterBase
Description
Sets the stream to receive the response body. Make sure to handle the cleanup of stream when Serialize generated error(Stream->GetError returns true after Stream->Serialize call), this http request will fail and quit.
NOTE: Once set, the data will no longer be cached in response, IHttpResponse::GetContent() and IHttpResponse::GetContentAsString() will return empty result. The Stream->Serialize will be called from another thread other than the game thread
Virtual Inheritance
- IHttpRequest::SetResponseBodyReceiveStream → FHttpRequestAdapterBase::SetResponseBodyReceiveStream
| Name | SetResponseBodyReceiveStream |
| Type | function |
| Header File | /Engine/Source/Runtime/Online/HTTP/Public/HttpRequestAdapter.h |
| Include Path | #include "HttpRequestAdapter.h" |
| Source | /Engine/Source/Runtime/Online/HTTP/Private/HttpRequestAdapter.cpp |
virtual bool SetResponseBodyReceiveStream
(
TSharedRef < FArchive > Stream
)
True if the stream can be used. False otherwise.
Parameters
| Name | Remarks |
|---|---|
| Stream | will be used to receive the response body |