HTTP Endpoint
A command can call an HTTP endpoint in or out of the Kubernetes cluster.
Property | Description |
---|---|
url | The URL to call. |
method | (Optional) The HTTP method to use. Valid values are get , post , put , delete ,
patch , or head . The default value is get . |
headers | (Optional) A map of HTTP headers to add to the request. |
bodyTemplate | (Optional) The HTTP body to send in the request. |
The following example defines a simple HTTP get
request of a REST service:
executor:
httpEndpoint:
url: https://www.google.com/?q=matrixx
The following example defines an HTTP put
request with headers and a body:
executor:
httpEndpoint:
url: http://restapi.com/helloWorld
method: put
headers:
content-type: application/json
bodyTemplate: |
{ "greeting": "hello" }