Skip to content

Commit

Permalink
Improved doc-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Dec 3, 2010
1 parent 6de1043 commit beddbd6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ring/mock/request.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
[query (encode-params params)])))))

(defn request
"Create a minimal valid request map from a HTTP method keyword and
a URI string. The URI can be relative or absolute."
"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."
([method uri]
(request method uri nil))
([method uri params]
Expand All @@ -35,7 +37,7 @@
:headers {}})))

(defn header
"Add a header to a request."
"Add a HTTP header to a request map."
[request name value]
(assoc-in request [:headers name] value))

Expand Down

0 comments on commit beddbd6

Please sign in to comment.