YQLRESTClient Class
Item Index
Methods
Methods
request
(
-
params
-
callbackFunction
-
yqlParams
-
yqlOpts
Sends a REST request.
Parameters:
-
params
ObjectRequest parameters object.
- accept
- Specifies the type of content to send in the response using the Accept HTTP header. This tells YQL what kind of data format you want returned, as well as how to parse it.
- content
- The body content of a POST or PUT request. This can be an object or a string. If an object is used, contentType is assumed to be application/x-www-form-urlencoded.
- contentType
- Specifies the content-type of the body content of a POST or PUT request.
- fallbackCharsets
- Overrides the list of fallback character sets, which is set to "utf-8, iso-8859-1" by default, for decoding the returned response. YQL attempts to decode the response using the character sets listed here when the response either does not specify the character set or specifies an incorrect character set that results in a failed decoding. This value may be an array of strings or one string with comma separated values.
- forceCharset
- Forces YQL to use the character set specified. Using this overrides both the character set specified by the response and the fallback character sets.
- headers
- Adds HTTP headers to the request.
- jsonCompat
- Set this value to 'new' to get "lossless" JSON when making a REST call to a Web service. jsonCompat: 'new' must also be set in the yqlParams object.
- matrix
- Adds matrix parameters to the request.
- method
- The HTTP method to use. Must be one of 'DELETE', 'GET', 'HEAD', 'POST' or 'PUT'.
- paths
- Array of paths to append to the url.
- query
- Query parameters to add to the request.
- timeout
- Specifies the request timeout in milliseconds. This is useful when you want to cancel requests that take longer than expected.
- url
- Provides a URL endpoint to query.
-
callbackFunction
FunctionThe response object is the only parameter.
-
yqlParams
Object(optional) Passes through to Y.YQL.
-
yqlOpts
Object(optional) Passes through to Y.YQL.