Skip to main content

HTTP

Whatโ€‹

HTTP Request is a simple segment to return any json data from any HTTP call.

Sample Configurationโ€‹

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

Optionsโ€‹

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

Template (info)โ€‹

default template
 {{ .Body }}

Propertiesโ€‹

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