--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a request to the specified URL.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "method:"
    body: HTTP method to be sent. method.to_s.upcase is used.
  - !ruby/struct:SM::Flow::LI 
    label: "uri:"
    body: a String or an URI object which represents an URL of web resource.
  - !ruby/struct:SM::Flow::LI 
    label: "query:"
    body: a Hash or an Array of query part of URL. e.g. { &quot;a&quot; =&gt; &quot;b&quot; } =&gt; 'http://host/part?a=b' Give an array to pass multiple value like
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "[\"a\", \"b\"], [\"a\", \"c\"]"
      body: =&gt; 'http://host/part?a=b&amp;a=c'
    type: :LABELED
  - !ruby/struct:SM::Flow::LI 
    label: "body:"
    body: a Hash or an Array of body part. e.g. { &quot;a&quot; =&gt; &quot;b&quot; } =&gt; 'a=b'. Give an array to pass multiple value like
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "[\"a\", \"b\"], [\"a\", \"c\"]"
      body: =&gt; 'a=b&amp;a=c'.
    type: :LABELED
  - !ruby/struct:SM::Flow::P 
    body: When the given method is 'POST' and the given body contains a file as a value, it will be posted as a multipart/form-data. e.g. { 'upload' =&gt; file } See HTTP::Message.file? for actual condition of 'a file'.
  - !ruby/struct:SM::Flow::LI 
    label: "extheader:"
    body: a Hash or an Array of extra headers. e.g. { 'Accept' =&gt; '*/*' } or [['Accept', 'image/jpeg'], ['Accept', 'image/png']].
  - !ruby/struct:SM::Flow::LI 
    label: "&block:"
    body: Give a block to get chunked message-body of response like get(uri) { |chunked_body| ... }. Size of each chunk may not be the same.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: You can also pass a String as a body. HTTPClient just sends a String as a HTTP request message body.
- !ruby/struct:SM::Flow::P 
  body: "When you pass an IO as a body, HTTPClient sends it as a HTTP request with chunked encoding (Transfer-Encoding: chunked in HTTP header). Bear in mind that some server application does not support chunked request. At least cgi.rb does not support it."
full_name: HTTPClient#request
is_singleton: false
name: request
params: (method, uri, query = nil, body = nil, extheader = {}, &block)
visibility: public
