Documentation
¶
Overview ¶
Package httprequest contains the httpRequest node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRequest ¶
HTTPRequest is a node that makes HTTP requests It implements the NodeExecutor interface
func NewHTTPRequest ¶
func NewHTTPRequest(node nodestore.NodeInterface, config *HTTPRequestConfig) *HTTPRequest
NewHTTPRequest creates a new HTTP request node
func (*HTTPRequest) Execute ¶
func (n *HTTPRequest) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute makes the HTTP request and returns the response
func (*HTTPRequest) Validate ¶
func (n *HTTPRequest) Validate() error
Validate checks if the node is properly configured
type HTTPRequestConfig ¶
type HTTPRequestConfig struct {
URL string `json:"url"`
Method string `json:"method"`
Headers map[string]string `json:"headers,omitempty"`
Body interface{} `json:"body,omitempty"`
// Username/Password set an HTTP Basic auth credential on the
// request. They are credential-typed fields: stored outside the
// exported flow document and merged back in at deploy time.
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
HTTPRequestConfig holds configuration for the HTTP request node