Request - Web Component โ
The Request component can be used imported from:
Playground โ
Parameters โ
The Web component uses the <z-request>
tag:
By default, all the parameters are optional or can be set in different, except for the ones marked as required
The parametrization of the component can be done with the following custom HTML params:
Name | Type | Description | Slot | A11y |
---|---|---|---|---|
url [required] | string | The URL to fetch data from | ||
method | string | The HTTP method to use | ||
body | string | The body of the request | ||
mode | string | The mode of the request | ||
credentials | string | The credentials of the request |
Events โ
This component has events. Check the documentation about how to use the events.
Name | Payload | Description |
---|
Parameters use โ
url
โ
The attribute url
is a string that represents the url
to the request that will be made.
method
โ
The attribute method
is a string that represents the method
to the request that will be made. Possible values are GET
, POST
, PUT
, DELETE
and PATCH
.
body
โ
The attribute body
conains the body contents that have been added to the request.
mode
โ
The mode
attribute contains the mode of the request (e.g., cors
, no-cors
, same-origin
, navigate
).
credentials
โ
The attribute credentials
indicates whether the user agent should send or receive cookies from the server.
TIP
For more information about Requests check this link.
Browser support โ
Detected engine: ย
Chromium
Webkit
Gecko