-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathresponse.d.ts
39 lines (39 loc) · 1.19 KB
/
response.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {HttpResponse} from './http_response';
import {Request} from './request';
export class Response<D, E> {
/**
* Whether more pages of data can be returned by further requests.
*/
hasNextPage(): boolean;
/**
* Creates a new request for the next page of response data, calling the callback with the page data if a callback is provided.
*/
nextPage(): Request<D, E> | null;
nextPage(callback: (err: E, data: D) => void): void;
/**
* The de-serialized response data from the service.
* Can be null if an error occurred.
*/
data: D|void
/**
* A structure containing information about a service or networking error.
*/
error: E|void
/**
* Returns the unique request ID associated with the response.
* Log this value when debugging requests for AWS support.
*/
requestId: string
/**
* The number of redirects that were followed before the request was completed.
*/
redirectCount: number
/**
* The number of retries that were attempted before the request was completed.
*/
retryCount: number
/**
* The raw HTTP response object containing the response headers and body information from the server.
*/
httpResponse: HttpResponse;
}