Преглед на файлове

Support matching query strings

Lu Stadler преди 7 години
родител
ревизия
d199d2f8ea
променени са 2 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 0 1
      go/fake-http/README.md
  2. 1 1
      go/fake-http/fake-http.go

+ 0 - 1
go/fake-http/README.md

@ -2,7 +2,6 @@
2 2
3 3
## TODO
4 4
5
- support matching query strings
6 5
- refactoring
7 6
- /_clear endpoint
8 7
- some kind of templating (request info + random functions?)

+ 1 - 1
go/fake-http/fake-http.go

@ -335,7 +335,7 @@ type Responses []Response
335 335
// Match returns a response definition matching the request.
336 336
func (rs *Responses) Match(req *http.Request) *Response {
337 337
	for _, resp := range *rs {
338
		if req.Method == resp.Method && req.URL.Path == resp.Path {
338
		if req.Method == resp.Method && req.URL.String() == resp.Path {
339 339
			return &resp
340 340
		}
341 341
	}