Navigation
Unreal Engine C++ API Reference > Plugins > ElectraHTTPStream > IElectraHTTPStream
References
Module | ElectraHTTPStream |
Header | /Engine/Plugins/Media/ElectraUtil/Source/ElectraHTTPStream/Public/ElectraHTTPStream.h |
Include | #include "ElectraHTTPStream.h" |
void AddRequest
(
IElectraHTTPStreamRequestPtr Request
)
Remarks
Adds the request for execution. A strong reference of the request is kept internally while the request is running. It is an error to drop the request object without calling Request->Cancel() if there is a notification delegate bound to the request. The delegate will be called from a worker thread even if you have released the request because of the strong reference being held internally. If your delegate callback object has been destroyed it may result in a crash. You must hold on to the request until the callback signals completion or you have to call Cancel().
If the request fails the registered notification delegate will be invoked with the cause set to 'Completed' and the parameter set to 1. The error cause can be retrieved from the request via GetErrorMessage(). Please note that HTTP responses like 404, 503 etc. are not an error per se. Handling of such responses must be made by the caller.