Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions x-pack/docs/en/watcher/input/http.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,28 @@ http://openweathermap.org/appid[OpenWeatherMap] service:
--------------------------------------------------
// NOTCONSOLE

===== Using token-based authentication

You can also call an API using a `Bearer token` instead of basic authentication. The `request.headers` object contains the HTTP headers:

[source,js]
--------------------------------------------------
"input" : {
"http" : {
"request" : {
"url": "https://api.example.com/v1/something",
"headers": {
"authorization" : "Bearer ABCD1234...",
"content-type": "application/json"
# other headers params..
},
"connection_timeout": "30s"
}
}
}
--------------------------------------------------
// NOTCONSOLE

==== Using templates

The `http` input supports templating. You can use <<templates,templates>> when
Expand Down