JavaScript Request : Object
Request is used to describe an request to a server. Use with fetch() to perform the
request and get a Response. Request, fetch(), and Response are a new, low level
replacement for XMLHttpRequest.
Constructors
new Request(url : String, [init : Object]) : Request
init : {
}
| body | Object | The data to send with the request. Must be a Blob, BufferSource, FormData, String, or URLSearchParams. |
| cache | String | See the cache property for the valid values. |
| credentials | String | See the credentials property for the valid values. |
| headers | Object | The http headers to send with the request. This will be passed to the Headers constructor. |
| integrity | String | |
| keepalive | Boolean | |
| method | String | The http method such as 'GET', 'POST', 'DELETE'. |
| mode | String | See the mode property for the valid values. |
| redirect | String | One of 'follow', 'error', or 'manual' |
| referrer | String | |
| referrerPolicy | String | One of '', 'no-referrer', 'no-referrer-when-downgrade',
'same-origin', 'origin', 'strict-origin',
'origin-when-cross-origin', 'strict-origin-when-cross-origin', or
'unsafe-url' |
| requestMode | String | One of 'navigate', 'same-origin', 'no-cors', or
'cors' |
| requestCredentials | String | One of 'omit', 'same-origin', or 'include' |
| signal | AbortSignal |
Example:
RunResults:
Instance Properties
cache : String
Will be one of: 'default', 'force-cache', 'no-cache',
'no-store', 'only-if-cached', 'reload'.
destination : String
Will be one of: '', 'audio', 'audioworklet', 'document',
'embed', 'font', 'frame', 'iframe', 'image',
'manifest', 'object', 'paintworklet', 'report',
'script', 'sharedworker', 'style', 'track',
'video', 'worker', 'xslt'.
Instance Methods
Copyright © PUBLIC Contributors