httpclient

package
v0.13.0-prerelease-test-4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const HypermodeConnectionName string = "hypermode"

Variables

This section is empty.

Functions

func GetHttpConnectionForUrl

func GetHttpConnectionForUrl(url string) (*manifest.HTTPConnectionInfo, error)

func GetHttpConnectionInfo

func GetHttpConnectionInfo(name string) (*manifest.HTTPConnectionInfo, error)

func PostToConnectionEndpoint

func PostToConnectionEndpoint[TResult any](ctx context.Context, connection *manifest.HTTPConnectionInfo, payload any) (*utils.HttpResult[TResult], error)

Types

type HttpHeader

type HttpHeader struct {
	Name   string
	Values []string
}

type HttpHeaders

type HttpHeaders struct {
	Data map[string]*HttpHeader
}

type HttpRequest

type HttpRequest struct {
	Url     string
	Method  string
	Headers *HttpHeaders
	Body    []byte
}

type HttpResponse

type HttpResponse struct {
	Status     uint16
	StatusText string
	Headers    *HttpHeaders
	Body       []byte
}

func Fetch

func Fetch(ctx context.Context, request *HttpRequest) (*HttpResponse, error)

Jump to

Keyboard shortcuts

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