Allow cancellation of HTTP requests
`NETWORK::HttpRequest()` now returns a HttpRequestFuture with a `Cancel()` method.
This commit is contained in:
@@ -2051,6 +2051,9 @@
|
||||
<Function name='GetHeld'/>
|
||||
<Function name='GetActive'/>
|
||||
</Class>
|
||||
<Class name='HttpRequestFuture'>
|
||||
<Function name='Cancel'/>
|
||||
</Class>
|
||||
<Class base='ActorFrame' name='TextBanner'>
|
||||
<Function name='Load'/>
|
||||
<Function name='SetFromSong'/>
|
||||
@@ -2498,6 +2501,7 @@
|
||||
<EnumValue name=''HttpErrorCode_TooManyRedirects'' value='13'/>
|
||||
<EnumValue name=''HttpErrorCode_ChunkReadError'' value='14'/>
|
||||
<EnumValue name=''HttpErrorCode_CannotReadBody'' value='15'/>
|
||||
<EnumValue name=''HttpErrorCode_Cancelled'' value='16'/>
|
||||
</Enum>
|
||||
<Enum name='ImageCacheMode'>
|
||||
<EnumValue name=''ImageCacheMode_Off'' value='0'/>
|
||||
|
||||
@@ -3560,7 +3560,7 @@ end
|
||||
<Function name='IsUrlAllowed' return='bool' arguments='string url'>
|
||||
Returns true if access to <code>url</code> is allowed.
|
||||
</Function>
|
||||
<Function name='HttpRequest' return='void' arguments='table params'>
|
||||
<Function name='HttpRequest' return='HttpRequestFuture' arguments='table params'>
|
||||
Performs an HTTP request.<br />
|
||||
Usage example:
|
||||
<pre><code>
|
||||
@@ -6210,6 +6210,12 @@ local spr = Def.Sprite{
|
||||
Returns true if the note was initiated.
|
||||
</Function>
|
||||
</Class>
|
||||
<Class name='HttpRequestFuture'>
|
||||
<Function name='Cancel' return='void' arguments=''>
|
||||
Cancels the running HTTP request. Does nothing if the request
|
||||
has already completed.
|
||||
</Function>
|
||||
</Class>
|
||||
<Class name='TextBanner' grouping='Actor'>
|
||||
<Function name='Load' return='void' arguments='string sMetricsGroup'>
|
||||
Loads the TextBanner from the specified metrics group.
|
||||
|
||||
Reference in New Issue
Block a user