Skip to content

Releases: NearlyUnique/httptestclient

Change from %s formatting to $<name|index>

Choose a tag to compare

@NearlyUnique NearlyUnique released this 27 Aug 11:44

A go vet rule "non-constant format string in call to URL()" makes using %s style format difficult without having different methods names depending on how the path might be specified.

previous code

resp := httptestclient.New(t).
    Post("/any/%s", "database-key").
    DoSimple(s)

New style

resp := httptestclient.New(t).
    Post("/any/$0", "database-key").
    DoSimple(s)

or

resp := httptestclient.New(t).
    Get("/any/$key", map[string]any{ "key": "database-key" }).
    DoSimple(s)

Forms, Redirects and Cookies

Choose a tag to compare

@NearlyUnique NearlyUnique released this 05 Aug 10:35

Add support for Forms, Redirects and cookies

Basic version (tidy readme)

Choose a tag to compare

@NearlyUnique NearlyUnique released this 28 Oct 21:00

Reword the readme for clarity and to update https://pkg.go.dev/github.com/NearlyUnique/httptestclient

Basic version

Choose a tag to compare

@NearlyUnique NearlyUnique released this 28 Oct 07:18

Added BuildRequest() to enable use of the httptest.ResponseRecorder

Initial release for feedback

Choose a tag to compare

@NearlyUnique NearlyUnique released this 23 Oct 22:33

Basic needs met, create and send requests, receive and parse response