Direct naar hoofdinhoud

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โ€‹

{
"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โ€‹

NameTypeDefaultDescription
urlstring``The HTTP URL you want to call, supports templates
methodstringGETThe HTTP method to use, GET or POST

Template (informatie)โ€‹

standaard template
 {{ .Body }}

Eigenschappenโ€‹

NameTypeDescription
.Body.propertystringReplace .property with the property you want to display