Skip to content

Commit e754587

Browse files
jkarniysangkok
authored andcommitted
Remove binary data test case
And add changelog entry.
1 parent 7ae7873 commit e754587

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

changelog.d/1584

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
synopsis: Escape special chars in QueryParams.
2+
prs: #1597
3+
issues: #1584
4+
5+
description: {
6+
7+
Escape special chars in QueryParam (':@&=+$') in servant-client. Note that this
8+
mean binary data will not work as is, and so reverts the functionality in #1432.
9+
10+
}

servant-client/test/Servant/SuccessSpec.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ successSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
101101
Left (FailureResponse _ r) <- runClient (getQueryParam (Just "bob")) baseUrl
102102
responseStatusCode r `shouldBe` HTTP.Status 400 "bob not found"
103103

104-
it "Servant.API.QueryParam binary data" $ \(_, baseUrl) -> do
105-
let payload = BS.pack [0, 1, 2, 4, 8, 16, 32, 64, 128]
106-
apiCall = getQueryParamBinary (Just $ UrlEncodedByteString payload) HTTP.methodGet
107-
(show +++ responseBody) <$> runClient apiCall baseUrl `shouldReturn` Right (BL.fromStrict payload)
108-
109104
it "Servant.API.QueryParam.QueryParams" $ \(_, baseUrl) -> do
110105
left show <$> runClient (getQueryParams []) baseUrl `shouldReturn` Right []
111106
left show <$> runClient (getQueryParams ["alice", "bob"]) baseUrl

0 commit comments

Comments
 (0)