Hierarchy
-
FetchRequest
- HttpApiRequest
Properties
Optional body
Body of the request.
Optional Readonly fragment
Additional part of the URL path to the API method.
Optional headers
Headers.
Readonly host
Domain or IP address of the request.
Optional method
HTTP request method.
The default method GET
is used.
Readonly path
Relative path to the URL API method.
Optional Readonly port
Request port.
Optional query
Parameters of the URL string for a query.
To form a web request for the address https://yandex.ru/search/ ?text=elma365
, do the following:
const result = await fetch('https://yandex.ru/search/', {
query: { 'text': 'elma365' }
});
Existing parameters in the address will be united with whatever is specified in query
.
Readonly scheme
Request protocol.
Advanced request parameters