sapitest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrBody

func GetErrBody(err sapi.Err) string

GetErrBody returns the body written for the given error response. This method should be exclusively used for testing.

func GetErrHeaders

func GetErrHeaders(err sapi.Err) http.Header

GetErrHeaders returns the headers written for the given error response. This method should be exclusively used for testing.

func GetErrStatus

func GetErrStatus(err sapi.Err) int

GetErrStatus returns the status code contained within the given error response. This method should be exclusively used for testing.

func GetResBody

func GetResBody(res sapi.Res) string

GetResBody returns the body written for the given response. This method should be exclusively used for testing.

func GetResData

func GetResData(res sapi.Res) any

GetResData returns the data contained in the given response. This requires the res to have been created via sapi.Data, otherwise nil is returned.

func GetResHeaders

func GetResHeaders(res sapi.Res) http.Header

GetResHeaders returns the headers written for the given response. This method should be exclusively used for testing.

func GetResStatus

func GetResStatus(res sapi.Res) int

GetResStatus returns the status code contained within the given response. This method should be exclusively used for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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