httputilsimplementationindependend

package
v0.414.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const STATUS_CODE_OK = 200

Variables

View Source
var ErrUnexpectedStatusCode = errors.New("unexpected status code")
View Source
var ErrWebServerAlreadyRunning = errors.New("web server already running")

Functions

This section is empty.

Types

type GenericResponse

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

This is the generic response type. It can also be seen as the default response to use.

func NewGenericResponse

func NewGenericResponse() (g *GenericResponse)

func (*GenericResponse) CheckStatusCode

func (g *GenericResponse) CheckStatusCode(expectedStatusCode int) error

func (*GenericResponse) GetBody

func (g *GenericResponse) GetBody() (body []byte, err error)

func (*GenericResponse) GetBodyAsString

func (g *GenericResponse) GetBodyAsString() (body string, err error)

func (*GenericResponse) GetStatusCode

func (g *GenericResponse) GetStatusCode() (statusCode int, err error)

func (*GenericResponse) IsStatusCode

func (g *GenericResponse) IsStatusCode(expectedStatusCode int) bool

func (*GenericResponse) IsStatusCode200Ok

func (g *GenericResponse) IsStatusCode200Ok() bool

func (*GenericResponse) RunJqQueryAgainstBody

func (g *GenericResponse) RunJqQueryAgainstBody(query string) (result string, err error)

func (*GenericResponse) RunYqQueryAgainstBody

func (g *GenericResponse) RunYqQueryAgainstBody(query string) (result string, err error)

func (*GenericResponse) SetBody

func (g *GenericResponse) SetBody(body []byte) (err error)

func (*GenericResponse) SetStatusCode

func (g *GenericResponse) SetStatusCode(statusCode int) (err error)

Jump to

Keyboard shortcuts

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