new RequestResult(method, path, query, requestRaw, requestContent, responseRaw, responseContent, statusCode, responseHeaders, startTime, endTime)
A structure containing the request and response context for a given FaunaDB request. Provided to an observer function optionally defined in the Client constructor.
Parameters:
Name | Type | Description |
---|---|---|
method |
'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | The HTTP method used in the request. |
path |
string | The path that was queried. Relative to the client's domain. |
query |
string | URL query parameters. Only set if |
requestRaw |
Object | The JSON request string. |
requestContent |
Object | The request data. |
responseRaw |
string | The unparsed response data, as a string. |
responseContent |
object | FaunaHttpErrorResponseContent | The response data parsed as JSON. |
statusCode |
number | The HTTP response status code. |
responseHeaders |
object | The HTTP headers returned in the response. |
startTime |
number | The time the request was issued by the client. |
endTime |
number | The time the response was received by the client. |
- Source:
Members
endTime :number
Type:
- number
- Source:
method :'GET'|'POST'|'PUT'|'PATCH'|'DELETE'
Type:
- 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
- Source:
path :string
Type:
- string
- Source:
query :object
URL query. Null unless method == 'get'
.
Not related to Client.query.
Type:
- object
- Source:
requestContent :object
Type:
- object
- Source:
requestRaw :string
Type:
- string
- Source:
responseContent :object|FaunaHttpErrorResponseContent
Parsed value returned by the server. Includes "resource" wrapper dict, or may be an FaunaHttpErrorResponseContent instead
Type:
- object | FaunaHttpErrorResponseContent
- Source:
responseHeaders :object
Type:
- object
- Source:
responseRaw :string
Type:
- string
- Source:
startTime :number
Type:
- number
- Source:
statusCode :number
Type:
- number
- Source: