Represents a single http request. Follows redirections. Generally don't use this directly; instead create either an XMLHttpRequest or e.g. a DataPackage.
|
| HttpRequest (ContentPackage package) |
| Creates a new http request using the given package. More...
|
|
void | Send () |
| Sends this request. Note that this does not block and is thread safe. Instead, OnRequestDone will be called when it's done. More...
|
|
void | abort () |
| Aborts this request (IAbortable interface). More...
|
|
void | Remove () |
| Removes this request from the active linked list. It won't be updated anymore. More...
|
|
void | Remove (bool waitingList) |
| Removes this request from a linked list. More...
|
|
IEnumerator | Loader () |
| The method which performs the loading of the unity WWW object. More...
|
|
void | Update (float deltaTime) |
| Advances this request by checking in on it's progress. More...
|
|
|
void | BeginRequest (string url, byte[] data, Dictionary< string, string > headers) |
|
void | HandleHeaders () |
| Checks if headers are available yet and handles them if they are. More...
|
|
|
static PropertyInfo | ResponseHeadersString |
| HACK! Workaround for a long standing Unity bug that doesn't allow multiple SET-COOKIE headers. More...
|
|
Creates a new http request using the given package.
- Parameters
-
package | The package that will receive the updates. |
onDone | A method to call with the result. |
void PowerUI.Http.HttpRequest.abort |
( |
) | |
|
|
inline |
void PowerUI.Http.HttpRequest.BeginRequest |
( |
string |
url, |
|
|
byte[] |
data, |
|
|
Dictionary< string, string > |
headers |
|
) |
| |
|
inlineprivate |
void PowerUI.Http.HttpRequest.HandleHeaders |
( |
) | |
|
|
inlineprivate |
Checks if headers are available yet and handles them if they are.
IEnumerator PowerUI.Http.HttpRequest.Loader |
( |
) | |
|
|
inline |
The method which performs the loading of the unity WWW object.
void PowerUI.Http.HttpRequest.Remove |
( |
) | |
|
|
inline |
Removes this request from the active linked list. It won't be updated anymore.
void PowerUI.Http.HttpRequest.Remove |
( |
bool |
waitingList) | |
|
|
inline |
Removes this request from a linked list.
- Parameters
-
waitingList | True if it should be removed from the waiting queue; false for the active queue. |
void PowerUI.Http.HttpRequest.Send |
( |
) | |
|
|
inline |
Sends this request. Note that this does not block and is thread safe. Instead, OnRequestDone will be called when it's done.
void PowerUI.Http.HttpRequest.Update |
( |
float |
deltaTime) | |
|
|
inline |
Advances this request by checking in on it's progress.
float PowerUI.Http.HttpRequest.Duration |
How long this request has taken so far.
IEnumerator PowerUI.Http.HttpRequest.LoadingEnumerator |
|
private |
The enumerator which processes the unity WWW object.
MovieTexture PowerUI.Http.HttpRequest.Movie |
The video being downloaded, if any. Note: Pro only.
The package this request originates from.
int PowerUI.Http.HttpRequest.RedirectionCount |
Active requests are in a linked list. The http request that follows this one.
Active requests are in a linked list. The http request that is before this one.
Dictionary<string,string> PowerUI.Http.HttpRequest.RequestHeaders |
|
private |
The set of request headers. Pulled from the package.
PropertyInfo PowerUI.Http.HttpRequest.ResponseHeadersString |
|
staticprivate |
HACK! Workaround for a long standing Unity bug that doesn't allow multiple SET-COOKIE headers.
float PowerUI.Http.HttpRequest.Timeout_ =float.MaxValue |
WWW PowerUI.Http.HttpRequest.WWWRequest |
The unity WWW object which performs the underlying request.
byte [] PowerUI.Http.HttpRequest.Bytes |
|
get |
The raw bytes of the response. Null if there was an error.
string PowerUI.Http.HttpRequest.ContentType |
|
get |
string PowerUI.Http.HttpRequest.Error |
|
get |
The error, if any, that occured whilst attempting to load the url.
bool PowerUI.Http.HttpRequest.Errored |
|
get |
True if the request had an issue. PowerUI.HttpRequest.Error is the error.
Texture2D PowerUI.Http.HttpRequest.Image |
|
get |
The response as an image. Null if there was an error.
Location PowerUI.Http.HttpRequest.location |
|
get |
The url that was requested.
bool PowerUI.Http.HttpRequest.Ok |
|
get |
True if there was no Unity error.
float PowerUI.Http.HttpRequest.Progress |
|
get |
The current download progress.
string PowerUI.Http.HttpRequest.ResponseHeaderString |
|
get |
The response header string.
string PowerUI.Http.HttpRequest.Text |
|
get |
The response as text. Empty string if there was an error.
float PowerUI.Http.HttpRequest.timeout |
|
getset |
Timeout in ms. Default is 0.
string PowerUI.Http.HttpRequest.url |
|
get |
The url that was requested.
MovieTexture PowerUI.Http.HttpRequest.Video |
|
get |
The response as a video. Null if there was an error.