Saltar al contenido principal

HTTP

Traducción Beta No Oficial

Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →

Qué hace

El segmento HTTP es una herramienta sencilla para obtener datos JSON desde cualquier llamada HTTP.

Configuración de ejemplo

{
"type": "http",
"style": "diamond",
"foreground": "#ffffff",
"background": "#c386f1",
"leading_diamond": "",
"trailing_diamond": "",
"template": "{{ .Result }}",
"options": {
"url": "https://jsonplaceholder.typicode.com/posts/1",
"method": "GET"
}
}

Opciones

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

Plantilla (info)

plantilla predeterminada
 {{ .Body }}

Propiedades

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