mirror of
https://github.com/Xevion/glance.git
synced 2025-12-06 05:15:14 -06:00
Allow specifying method and request body
This commit is contained in:
@@ -1292,6 +1292,9 @@ Examples:
|
||||
| ---- | ---- | -------- | ------- |
|
||||
| url | string | yes | |
|
||||
| headers | key (string) & value (string) | no | |
|
||||
| method | string | no | GET |
|
||||
| body-type | string | no | json |
|
||||
| body | any | no | |
|
||||
| frameless | boolean | no | false |
|
||||
| allow-insecure | boolean | no | false |
|
||||
| template | string | yes | |
|
||||
@@ -1310,6 +1313,31 @@ headers:
|
||||
Accept: application/json
|
||||
```
|
||||
|
||||
##### `method`
|
||||
The HTTP method to use when making the request. Possible values are `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS` and `HEAD`.
|
||||
|
||||
##### `body-type`
|
||||
The type of the body that will be sent with the request. Possible values are `json`, and `string`.
|
||||
|
||||
##### `body`
|
||||
The body that will be sent with the request. It can be a string or a map. Example:
|
||||
|
||||
```yaml
|
||||
body-type: json
|
||||
body:
|
||||
key1: value1
|
||||
key2: value2
|
||||
multiple-items:
|
||||
- item1
|
||||
- item2
|
||||
```
|
||||
|
||||
```yaml
|
||||
body-type: string
|
||||
body: |
|
||||
key1=value1&key2=value2
|
||||
```
|
||||
|
||||
##### `frameless`
|
||||
When set to `true`, removes the border and padding around the widget.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user