Skip to content

maybe wrong behaviour on params' request parameter #9

@marianoguerra

Description

@marianoguerra

here http://weavejester.github.io/ring-mock/ring.mock.request.html#var-request it says

Create a minimal valid request map from a HTTP method keyword, a string
containing a URI, and an optional map of parameters that will be added to
the query string of the URI. The URI can be relative or absolute. Relative
URIs are assumed to go to http://localhost.

but

user=> (:query-string (req/request :delete "/foo" {:id 4}))
nil

user=> (slurp (:body (req/request :delete "/foo" {:id 4})))
"id=4"

with this it works

user=> (:query-string (req/query-string (req/request :delete "/foo" {:id 4}) {:id 4}))
"id=4"

is the doc wrong, the code wrong or am I wrong? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions