When using Sendable () and HTTP POST request with query parameters, an extra slash is added to the URL path which often returns a 404 when the server does not expect the path to have a trailing slash.
|
pathParamsSep xs = if T.isInfixOf "." (last xs) then "?" else "/?" |
If I replace "/?" with "?" there is no problem. What's the purpose of it? If it's to cover the case where the baseURL has no trailing slash, it feels a bit of a hack and "/?" and "?" are the wrong way around :)
When using
Sendable ()and HTTP POST request with query parameters, an extra slash is added to the URL path which often returns a 404 when the server does not expect the path to have a trailing slash.api-builder/src/Network/API/Builder/Routes.hs
Line 57 in 7650616
If I replace "/?" with "?" there is no problem. What's the purpose of it? If it's to cover the case where the baseURL has no trailing slash, it feels a bit of a hack and "/?" and "?" are the wrong way around :)