gavv / gavv/httpexpect

Cannot get .WithPath to handle URL-encoded value

Open
#448 1 comment 0 reactions 0 assignees View on GitHub
can't reproduce
Dominant language
Go
Stars
2.7k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

I am using httpexpect version 2.16.0 to test one of our endpoints that wants a url-encoded path.

It looks something like this

```
path := "some:data/thats/encoded@0.1.0
urlEncoded := url.QueryEscape(path)

e.GET("/data/{urlEncoded}").
WithPath("urlEncoded", urlEncoded).
Expect().
Status(http.StatusOK)
```
httpexpect fails with the following output

```
GET /data/some%!A(MISSING)data%!F(MISSING)thats%!F(MISSING)encoded%!.(MISSING)0 HTTP/1.1
```

Any ideas on what I am doing wrong?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.