fix for url query params in url
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
a1f432fac9
commit
807b4dc41a
8
http.go
8
http.go
@ -88,7 +88,13 @@ func newRequest(ctx context.Context, addr string, req client.Request, ct string,
|
|||||||
return nil, errors.BadRequest("go.micro.client", err.Error())
|
return nil, errors.BadRequest("go.micro.client", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
path, nmsg, err := newPathRequest(u.Path, method, body, msg, tags)
|
var nmsg interface{}
|
||||||
|
if len(u.Query()) > 0 {
|
||||||
|
path, nmsg, err = newPathRequest(u.Path+"?"+u.Query().Encode(), method, body, msg, tags)
|
||||||
|
} else {
|
||||||
|
path, nmsg, err = newPathRequest(u.Path, method, body, msg, tags)
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.BadRequest("go.micro.client", err.Error())
|
return nil, errors.BadRequest("go.micro.client", err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user