Documentation ¶
Index ¶
- func MakeRequest(t testing.TB, method, uri string, modifiers ...RequestModifier) *http.Request
- type ExtendedResponse
- func Delete[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
- func DeleteWithResponbe[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
- func Get[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
- func GetWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
- func Patch[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
- func PatchWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
- func Post[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
- func PostWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
- func Put[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
- func PutWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
- type RequestModifier
- func WithBearerToken(t testing.TB, token string) RequestModifier
- func WithBody[T any](t testing.TB, body T) RequestModifier
- func WithCookies(t testing.TB, cookies []*http.Cookie) RequestModifier
- func WithHeaders(t testing.TB, headers http.Header) RequestModifier
- func WithQuery(t testing.TB, queryMap map[string]string) RequestModifier
- type RequestSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRequest ¶
Types ¶
type ExtendedResponse ¶
func Delete ¶
func Delete[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
func DeleteWithResponbe ¶
func DeleteWithResponbe[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
func Get ¶
func Get[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
func GetWithResponse ¶
func GetWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
func Patch ¶
func Patch[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
func PatchWithResponse ¶
func PatchWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
func Post ¶
func Post[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
func PostWithResponse ¶
func PostWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
func Put ¶
func Put[TSender RequestSender[any]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[any]
func PutWithResponse ¶
func PutWithResponse[TRes any, TSender RequestSender[TRes]](t testing.TB, app TSender, uri string, modifiers ...RequestModifier) ExtendedResponse[TRes]
func (ExtendedResponse[T]) AssertHeader ¶
func (e ExtendedResponse[T]) AssertHeader(t testing.TB, header, value string)
func (ExtendedResponse[T]) AssertStatusCode ¶
func (e ExtendedResponse[T]) AssertStatusCode(t testing.TB, status int)
func (ExtendedResponse[T]) Data ¶
func (e ExtendedResponse[T]) Data(tb testing.TB) T
type RequestModifier ¶
func WithBearerToken ¶
func WithBearerToken(t testing.TB, token string) RequestModifier
func WithCookies ¶
func WithCookies(t testing.TB, cookies []*http.Cookie) RequestModifier
func WithHeaders ¶
func WithHeaders(t testing.TB, headers http.Header) RequestModifier
type RequestSender ¶
Click to show internal directories.
Click to hide internal directories.