client

package
v0.1.55 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "http_client"
	RequestPort   = "request"
	ResponsePort  = "response"
	ErrorPort     = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func (*Component) GetInfo

func (h *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (h *Component) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) any

func (*Component) Instance

func (h *Component) Instance() module.Component

func (*Component) Ports

func (h *Component) Ports() []module.Port

type Context

type Context any

type Error

type Error struct {
	Context  Context          `json:"context" configurable:"true" required:"true" title:"Context" description:"Message to be sent further"`
	Response ResponseResponse `json:"response"`
	Error    string           `json:"error" required:"true"`
}

type Request

type Request struct {
	Context     Context         `json:"context,omitempty" configurable:"true" title:"Context" description:"Message to be sent further"`
	Method      string          `` /* 137-byte string literal not displayed */
	Timeout     int             `json:"timeout" required:"true" title:"Request Timeout" colSpan:"col-span-6"`
	URL         string          `json:"url" required:"true" title:"URL" format:"uri"`
	Headers     []etc.Header    `json:"headers,omitempty" title:"Headers"`
	ContentType etc.ContentType `json:"contentType" title:"Request Content Type" required:"true"`
	Body        string          `json:"body" title:"Request Body" format:"textarea"`
}

type Response

type Response struct {
	Context  Context          `json:"context" configurable:"true" required:"true" title:"Context" description:"Message to be sent further"`
	Response ResponseResponse `json:"response" title:"Response" required:"true" description:"HTTP Response"`
}

type ResponseResponse

type ResponseResponse struct {
	Headers    []etc.Header `json:"headers" required:"true" title:"Headers"`
	Status     string       `json:"status"`
	StatusCode int          `json:"statusCode"`
	Body       string       `json:"body" configurable:"false" title:"Body"`
}

type Settings

type Settings struct {
	EnableErrorPort bool `` /* 201-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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