request

package
v0.0.0-...-66c13d8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0, Apache-2.0, BSD-2-Clause, + 1 more Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultHttpRequest

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

func (*DefaultHttpRequest) AddFormParam

func (httpRequest *DefaultHttpRequest) AddFormParam(key string, value def.FormData)

func (*DefaultHttpRequest) AddHeaderParam

func (httpRequest *DefaultHttpRequest) AddHeaderParam(key string, value string)

func (*DefaultHttpRequest) AddPathParam

func (httpRequest *DefaultHttpRequest) AddPathParam(key string, value string)

func (*DefaultHttpRequest) AddQueryParam

func (httpRequest *DefaultHttpRequest) AddQueryParam(key string, value string)

func (*DefaultHttpRequest) Builder

func (httpRequest *DefaultHttpRequest) Builder() *HttpRequestBuilder

func (*DefaultHttpRequest) CanonicalMapQueryParams

func (httpRequest *DefaultHttpRequest) CanonicalMapQueryParams(key string, value reflect.Value) []map[string]string

func (*DefaultHttpRequest) CanonicalSliceQueryParamsToMulti

func (httpRequest *DefaultHttpRequest) CanonicalSliceQueryParamsToMulti(value reflect.Value) []string

func (*DefaultHttpRequest) CanonicalStringQueryParams

func (httpRequest *DefaultHttpRequest) CanonicalStringQueryParams(value reflect.Value) string

func (*DefaultHttpRequest) ConvertRequest

func (httpRequest *DefaultHttpRequest) ConvertRequest() (*http.Request, error)

func (*DefaultHttpRequest) GetBody

func (httpRequest *DefaultHttpRequest) GetBody() interface{}

func (*DefaultHttpRequest) GetBodyToBytes

func (httpRequest *DefaultHttpRequest) GetBodyToBytes() (*bytes.Buffer, error)

func (*DefaultHttpRequest) GetEndpoint

func (httpRequest *DefaultHttpRequest) GetEndpoint() string

func (*DefaultHttpRequest) GetFormPrams

func (httpRequest *DefaultHttpRequest) GetFormPrams() map[string]def.FormData

func (*DefaultHttpRequest) GetHeaderParams

func (httpRequest *DefaultHttpRequest) GetHeaderParams() map[string]string

func (*DefaultHttpRequest) GetMethod

func (httpRequest *DefaultHttpRequest) GetMethod() string

func (*DefaultHttpRequest) GetPath

func (httpRequest *DefaultHttpRequest) GetPath() string

func (*DefaultHttpRequest) GetPathPrams

func (httpRequest *DefaultHttpRequest) GetPathPrams() map[string]string

func (*DefaultHttpRequest) GetQueryParams

func (httpRequest *DefaultHttpRequest) GetQueryParams() map[string]interface{}

type HttpRequest

type HttpRequest interface {
	Builder() *HttpRequestBuilder
	GetEndpoint() string
	GetMethod() string
	GetPath() string
	GetHeaderParams() map[string]string
	GetPathPrams() map[string]string
	GetQueryParams() map[string]interface{}
	GetBody() interface{}
	GetBodyToBytes() (*bytes.Buffer, error)
}

type HttpRequestBuilder

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

func NewHttpRequestBuilder

func NewHttpRequestBuilder() *HttpRequestBuilder

func (*HttpRequestBuilder) AddAutoFilledPathParam

func (builder *HttpRequestBuilder) AddAutoFilledPathParam(key string, value string) *HttpRequestBuilder

func (*HttpRequestBuilder) AddFormParam

func (builder *HttpRequestBuilder) AddFormParam(key string, value def.FormData) *HttpRequestBuilder

func (*HttpRequestBuilder) AddHeaderParam

func (builder *HttpRequestBuilder) AddHeaderParam(key string, value string) *HttpRequestBuilder

func (*HttpRequestBuilder) AddPathParam

func (builder *HttpRequestBuilder) AddPathParam(key string, value string) *HttpRequestBuilder

func (*HttpRequestBuilder) AddQueryParam

func (builder *HttpRequestBuilder) AddQueryParam(key string, value interface{}) *HttpRequestBuilder

func (*HttpRequestBuilder) Build

func (builder *HttpRequestBuilder) Build() *DefaultHttpRequest

func (*HttpRequestBuilder) WithBody

func (builder *HttpRequestBuilder) WithBody(kind string, body interface{}) *HttpRequestBuilder

func (*HttpRequestBuilder) WithEndpoint

func (builder *HttpRequestBuilder) WithEndpoint(endpoint string) *HttpRequestBuilder

func (*HttpRequestBuilder) WithMethod

func (builder *HttpRequestBuilder) WithMethod(method string) *HttpRequestBuilder

func (*HttpRequestBuilder) WithPath

func (builder *HttpRequestBuilder) WithPath(path string) *HttpRequestBuilder

Jump to

Keyboard shortcuts

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