Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http/client.cr
Original file line number Diff line number Diff line change
@@ -297,7 +297,7 @@ class HTTP::Client
#
# ```
# client = HTTP::Client.new("www.example.com")
# response = client.{{method.id}}("/", headers: HTTP::Headers{"User-agent": "AwesomeApp"}, body: "Hello!")
# response = client.{{method.id}}("/", headers: HTTP::Headers{"User-agent" => "AwesomeApp"}, body: "Hello!")
# response.body #=> "..."
# ```
def {{method.id}}(path, headers : HTTP::Headers? = nil, body : String? = nil) : HTTP::Client::Response
@@ -309,7 +309,7 @@ class HTTP::Client
#
# ```
# client = HTTP::Client.new("www.example.com")
# client.{{method.id}}("/", headers: HTTP::Headers{"User-agent": "AwesomeApp"}, body: "Hello!") do |response|
# client.{{method.id}}("/", headers: HTTP::Headers{"User-agent" => "AwesomeApp"}, body: "Hello!") do |response|
# response.body_io.gets #=> "..."
# end
# ```
@@ -323,7 +323,7 @@ class HTTP::Client
# The response will have its body as a `String`, accessed via `HTTP::Client::Response#body`.
#
# ```
# response = HTTP::Client.{{method.id}}("/", headers: HTTP::Headers{"User-agent": "AwesomeApp"}, body: "Hello!")
# response = HTTP::Client.{{method.id}}("/", headers: HTTP::Headers{"User-agent" => "AwesomeApp"}, body: "Hello!")
# response.body #=> "..."
# ```
def self.{{method.id}}(url : String | URI, headers : HTTP::Headers? = nil, body : String? = nil, tls = nil) : HTTP::Client::Response
@@ -334,7 +334,7 @@ class HTTP::Client
# The response will have its body as an `IO` accessed via `HTTP::Client::Response#body_io`.
#
# ```
# HTTP::Client.{{method.id}}("/", headers: HTTP::Headers{"User-agent": "AwesomeApp"}, body: "Hello!") do |response|
# HTTP::Client.{{method.id}}("/", headers: HTTP::Headers{"User-agent" => "AwesomeApp"}, body: "Hello!") do |response|
# response.body_io.gets #=> "..."
# end
# ```

0 comments on commit c674cbe

Please sign in to comment.