HTTP
Onofficiรซle Beta-vertaling
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ
Watโ
HTTP-verzoek is een eenvoudig segment om JSON-gegevens van een HTTP-aanroep terug te geven.
Voorbeeldconfiguratieโ
- json
- yaml
- toml
{
"type": "http",
"style": "diamond",
"foreground": "#ffffff",
"background": "#c386f1",
"leading_diamond": "๎ถ",
"trailing_diamond": "๎ฐ",
"template": "{{ .Result }}",
"options": {
"url": "https://jsonplaceholder.typicode.com/posts/1",
"method": "GET"
}
}
type: http
style: diamond
foreground: "#ffffff"
background: "#c386f1"
leading_diamond: ๎ถ
trailing_diamond: ๎ฐ
template: "{{ .Result }}"
options:
url: https://jsonplaceholder.typicode.com/posts/1
method: GET
type = "http"
style = "diamond"
foreground = "#ffffff"
background = "#c386f1"
leading_diamond = "๎ถ"
trailing_diamond = "๎ฐ"
template = "{{ .Result }}"
[options]
url = "https://jsonplaceholder.typicode.com/posts/1"
method = "GET"
Optiesโ
| Name | Type | Default | Description |
|---|---|---|---|
url | string | `` | The HTTP URL you want to call, supports templates |
method | string | GET | The HTTP method to use, GET or POST |
Template (informatie)โ
standaard template
{{ .Body }}
Eigenschappenโ
| Name | Type | Description |
|---|---|---|
.Body.property | string | Replace .property with the property you want to display |