http_action

package
v0.0.0-...-f514c2e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

HTTP Action

Call an HTTP API or webservice.

Limitation: Only method HTTP POST available

Input fields

  • Url string - the url to make a call to; requires to be prepended by http:// or https://.
  • Method string - HTTP method, only "POST" available
  • RequestBody []byte - Request body.
  • ContentType string - the content type, e.g. "application/json"

Response fields

  • ResponseBody []byte - Response body that is returned by the webservice / API.

  • ResponseHeaders map[string][]string - Response headers of the HTTP request.

  • ResponseStatus int - Response code of the request, e.g. 200, 500

Documentation

Index

Constants

View Source
const (
	Url                = "url"
	Method             = "method"
	RequestBody        = "requestBody"
	ContentType        = "contentType"
	ResponseBody       = "responseBody"
	ResponseHeaders    = "responseHeaders"
	ResponseStatusCode = "responseStatusCode"
)

Variables

This section is empty.

Functions

func Invoke

func Invoke(stub domain.Stub, input map[string]interface{}) (output map[string]interface{}, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL