Skip to content

Releases: jarcoal/httpmock

v1.3.1

16 Aug 13:08
Compare
Choose a tag to compare

Fix:

v1.3.0

04 Feb 21:22
e977d51
Compare
Choose a tag to compare

New features:

Miscellaneous:

  • documentation now uses new go1.19 doc features;
  • go minimal version required is now 1.13;
  • CI tests using go1.20 & golangci-lint v1.51.0.

v1.2.0

06 May 14:54
fbf2267
Compare
Choose a tag to compare

New features:

Fixes:

  • url.RawPath is used instead of url.Path when checking path alone for consistency with full URL check, which is always unescaped.
    Let 2 registered responders:

    1. GET http://z.tld/foo%2fbar
    2. GET /foo%2fbar

    Before this release:

    • GET http://z.tld/foo%2fbar is caught by 1
    • GET http://unknown.tld/foo%2fbar is not caught as the tested path is /foo/bar instead of /foo%2fbar

    From this release:

    • GET http://z.tld/foo%2fbar is caught by 1
    • GET http://unknown.tld/foo%2fbar is caught by 2
  • save of old clients transports is now protected from concurrent writes (@roboslone).

Miscellaneous:

  • now use go-testdeep to simplify tests (saves >500 test lines);
  • go minimal version required is now 1.9;
  • CI tests using go1.18 & golangci-lint v1.45.0;
  • signatures (and so documentation) now use any type instead of interface{}, as appeared in go 1.18 (in a compatible manner with go<1.18).

Enjoy!

v1.1.0

22 Dec 09:46
a62b874
Compare
Choose a tag to compare

New features:

  • tell the user about possible mistakes concerning the mocked HTTP method;
  • by default, registering a Responder for a lower-cased method among CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT and TRACE, produces a panic as it is probably a mistake. This behavior can be disabled by setting new MockTransport.DontCheckMethod field to true prior to the Register*Responder*() call;
  • registering a nil Responder now unregisters it and zeroes its statistics;
  • add Responder methods:

Fix:

Doc:

  • document that (re-)registering a Responder zeroes its statistics.

Enjoy!

v1.0.8

28 Jan 10:20
6150913
Compare
Choose a tag to compare

New feature:

Enjoy!

v1.0.7

05 Jan 22:19
c34dbbb
Compare
Choose a tag to compare

New feature:

  • add File type allowing to easily serve files contents

Fix:

Misc:

  • test coverage increased almost 100% (OK 99.843% :) )
  • code reorganized
  • more linters involved
  • documentation updated
  • examples style normalized
  • CI now use github actions instead of travis

Enjoy!

v1.0.6

10 Aug 07:29
4996090
Compare
Choose a tag to compare

Responder generated by httpmock can now be used concurrently — #93 reported by @ascherkus

v1.0.5

17 Mar 17:29
b71b92c
Compare
Choose a tag to compare

Add ZeroCallCounters function & method

v1.0.4

02 May 19:07
ac2099d
Compare
Choose a tag to compare

Add regexp responders feature.

To register a regexp responder, see:

And to help writing custom responders, new functions:

v1.0.3

16 Apr 08:28
e598472
Compare
Choose a tag to compare
  • NewNotFoundResponder() stack trace reworked;
  • Add Once, Times and Trace Responder methods.