FilePrepend
: const string |
Obtains uri from the url and url parameters
Signature
const string Meta.WitAi.Requests.VRequest.FilePrepend |
IsPerforming
: bool |
If request is queued to run or running
Signature
bool Meta.WitAi.Requests.VRequest.IsPerforming |
MaxConcurrentRequests
: int |
Ensures only this many requests can run at one time
Signature
int Meta.WitAi.Requests.VRequest.MaxConcurrentRequests |
Completion
: TaskCompletionSource< bool >
[Get] |
Completion source task
Signature
TaskCompletionSource<bool> Meta.WitAi.Requests.VRequest.Completion |
ContentType
: string
[Get][Set] |
The content type to be used
Signature
string Meta.WitAi.Requests.VRequest.ContentType |
Downloader
: DownloadHandler
[Get][Set] |
Script used as download handler
Signature
DownloadHandler Meta.WitAi.Requests.VRequest.Downloader |
DownloadProgress
: float
[Get] |
Current progress for download
Signature
float Meta.WitAi.Requests.VRequest.DownloadProgress |
HasFirstResponse
: bool
[Get] |
If first response has been received
Signature
bool Meta.WitAi.Requests.VRequest.HasFirstResponse |
IsComplete
: bool
[Get] |
If request has completed queueing and running a request
Signature
bool Meta.WitAi.Requests.VRequest.IsComplete |
IsDecoding
: bool
[Get] |
If request is currently decoding following a response
Signature
bool Meta.WitAi.Requests.VRequest.IsDecoding |
IsQueued
: bool
[Get] |
If request is currently queued to run
Signature
bool Meta.WitAi.Requests.VRequest.IsQueued |
IsRunning
: bool
[Get] |
If request is currently transmitting or receiving data
Signature
bool Meta.WitAi.Requests.VRequest.IsRunning |
Logger
: IVLogger
[Get] |
Signature
IVLogger Meta.WitAi.Requests.VRequest.Logger |
Method
: VRequestMethod
[Get][Set] |
Method the request will be used
Signature
VRequestMethod Meta.WitAi.Requests.VRequest.Method |
ResponseCode
: int
[Get][Set] |
Response Code if applicable
Signature
int Meta.WitAi.Requests.VRequest.ResponseCode |
ResponseError
: string
[Get] |
Response error
Signature
string Meta.WitAi.Requests.VRequest.ResponseError |
Timeout
: int
[Get][Set] |
Timeout in seconds
Signature
int Meta.WitAi.Requests.VRequest.Timeout |
TimeoutMs
: int
[Get][Set] |
Timeout in milliseconds
Signature
int Meta.WitAi.Requests.VRequest.TimeoutMs |
Uploader
: UploadHandler
[Get][Set] |
Script used as upload handler
Signature
UploadHandler Meta.WitAi.Requests.VRequest.Uploader |
UploadProgress
: float
[Get] |
Current progress for get requests
Signature
float Meta.WitAi.Requests.VRequest.UploadProgress |
Url
: string
[Get][Set] |
Url to be used for the vrequest
Signature
string Meta.WitAi.Requests.VRequest.Url |
UrlParameters
: Dictionary< string, string >
[Get][Set] |
Url parameters to be used for the vrequest
Signature
Dictionary<string, string> Meta.WitAi.Requests.VRequest.UrlParameters |
OnDownloadProgress
: VRequestProgressDelegate |
Callback on request download progress change
Signature
VRequestProgressDelegate Meta.WitAi.Requests.VRequest.OnDownloadProgress |
OnFirstResponse
: VRequestResponseDelegate |
Callback on request first response
Signature
VRequestResponseDelegate Meta.WitAi.Requests.VRequest.OnFirstResponse |
OnUploadProgress
: VRequestProgressDelegate |
Callback on request upload progress change
Signature
VRequestProgressDelegate Meta.WitAi.Requests.VRequest.OnUploadProgress |
CreateRequest
(
url
, method
, headers
)
|
Generates UnityWebRequest
Signature
virtual UnityWebRequest Meta.WitAi.Requests.VRequest.CreateRequest(string url, string method, Dictionary< string, string > headers) Parameters url: stringmethod: stringheaders: Dictionary< string, string >Returns UnityWebRequest |
DecodeSuccess
(
request
)
|
Returns true if no error
Signature
Task<bool> Meta.WitAi.Requests.VRequest.DecodeSuccess(UnityWebRequest request) Parameters request: UnityWebRequestReturns Task< bool > |
Dispose
()
|
Handles dispose and removal of request from running queue
Signature
virtual void Meta.WitAi.Requests.VRequest.Dispose() Returns void |
GetError
(
request
)
|
Attempts to obtain any errors
Signature
virtual async Task<Tuple<int, string> > Meta.WitAi.Requests.VRequest.GetError(UnityWebRequest request) Parameters request: UnityWebRequestReturns async Task< Tuple< int, string > > |
GetHeaders
()
|
Obtains request headers if applicable
Signature
virtual Dictionary<string, string> Meta.WitAi.Requests.VRequest.GetHeaders() Returns Dictionary< string, string > |
GetMethod
()
|
Obtain request method id
Signature
virtual string Meta.WitAi.Requests.VRequest.GetMethod() Returns string |
GetUri
()
|
Signature
virtual Uri Meta.WitAi.Requests.VRequest.GetUri() Returns Uri |
RaiseFirstResponse
()
|
Raise first response callback
Signature
virtual void Meta.WitAi.Requests.VRequest.RaiseFirstResponse() Returns void |
UpdateDownloadProgress
(
progress
)
|
Update download progress
Signature
virtual void Meta.WitAi.Requests.VRequest.UpdateDownloadProgress(float progress) Parameters progress: floatReturns void |
WaitWhileRunning
()
|
Wait while request is running
Signature
virtual async Task Meta.WitAi.Requests.VRequest.WaitWhileRunning() Returns async Task |
Cancel
()
|
Method to cancel a VRequest
Signature
virtual void Meta.WitAi.Requests.VRequest.Cancel() Returns void |
GetTmpDownloadPath
(
downloadPath
)
|
Signature
string Meta.WitAi.Requests.VRequest.GetTmpDownloadPath(string downloadPath) Parameters downloadPath: stringReturns string |
Request< TValue >
(
decoder
)
|
Performs a request from the main thread or a background thread
Signature
virtual async Task<VRequestResponse<TValue> > Meta.WitAi.Requests.VRequest.Request< TValue >(VRequestDecodeDelegate< TValue > decoder) Parameters decoder: VRequestDecodeDelegate< TValue >Returns async Task< VRequestResponse< TValue > > |
RequestFile
(
url
)
|
Performs a get request on a file url
Signature
async Task<VRequestResponse<byte[]> > Meta.WitAi.Requests.VRequest.RequestFile(string url) Parameters url: stringReturns async Task< VRequestResponse< byte[]> > |
RequestFileDownload
(
url
, downloadPath
)
|
Performs a download from a specified location to a new location
Signature
async Task<VRequestResponse<bool> > Meta.WitAi.Requests.VRequest.RequestFileDownload(string url, string downloadPath) Parameters url: stringdownloadPath: stringReturns async Task< VRequestResponse< bool > > |
RequestFileExists
(
url
)
|
Checks if a file exists at a specified location using async calls
Signature
async Task<VRequestResponse<bool> > Meta.WitAi.Requests.VRequest.RequestFileExists(string url) Parameters url: stringReturns async Task< VRequestResponse< bool > > |
RequestFileHeaders
(
url
)
|
Performs a header request on a uri
Signature
async Task<VRequestResponse<Dictionary<string, string> > > Meta.WitAi.Requests.VRequest.RequestFileHeaders(string url) Parameters url: stringReturns async Task< VRequestResponse< Dictionary< string, string > > > |
RequestJson< TData >
(
onPartial
)
|
Performs a request for text & decodes it into json
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJson< TData >(Action< TData > onPartial=null) Parameters onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonGet< TData >
(
onPartial
)
|
Perform a json get request with the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonGet< TData >(Action< TData > onPartial=null) Parameters onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPost< TData >
(
onPartial
)
|
Perform a json get request with the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPost< TData >(Action< TData > onPartial=null) Parameters onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPost< TData >
(
postData
, onPartial
)
|
Perform a json post request with raw data and the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPost< TData >(byte[] postData, Action< TData > onPartial=null) Parameters postData: byte []onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPost< TData >
(
postText
, onPartial
)
|
Perform a json post request with string data and the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPost< TData >(string postText, Action< TData > onPartial=null) Parameters postText: stringonPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPut< TData >
(
onPartial
)
|
Perform a json put request with the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPut< TData >(Action< TData > onPartial=null) Parameters onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPut< TData >
(
putData
, onPartial
)
|
Perform a json put request with raw data and the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPut< TData >(byte[] putData, Action< TData > onPartial=null) Parameters putData: byte []onPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestJsonPut< TData >
(
putText
, onPartial
)
|
Perform a json put request with string data and the option for a partial response
Signature
async Task<VRequestResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPut< TData >(string putText, Action< TData > onPartial=null) Parameters putText: stringonPartial: Action< TData >Returns async Task< VRequestResponse< TData > > |
RequestText
(
onPartial
)
|
Performs a text request with an option partial response callback
Signature
async Task<VRequestResponse<string> > Meta.WitAi.Requests.VRequest.RequestText(Action< string > onPartial=null) Parameters onPartial: Action< string >Returns async Task< VRequestResponse< string > > |
Reset
()
|
Resets all data
Signature
virtual void Meta.WitAi.Requests.VRequest.Reset() Returns void |