http

package
v4.0.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

HTTP process http request

func New

func New() *HTTP

New

func (*HTTP) Execute

Execute Process method of the plugin "executor": "http",

"executor_config": {
    "method": "GET",             // Request method in uppercase
    "url": "http://example.com", // Request url
    "headers": "[]"              // Json string, such as "[\"Content-Type: application/json\"]"
    "body": "",                  // POST body
    "timeout": "30",             // Request timeout, unit seconds
    "expectCode": "200",         // Expect response code, such as 200,206
    "expectBody": "",            // Expect response body, support regexp, such as /success/
    "debug": "true"              // Debug option, will log everything when this option is not empty
}

func (*HTTP) ExecuteImpl

func (s *HTTP) ExecuteImpl(args *types.ExecuteRequest) ([]byte, error)

ExecuteImpl do http request

Jump to

Keyboard shortcuts

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