Class: HTTP::Post
- Defined in:
- lib/http_client/mri/methods.rb,
lib/http_client/jruby/methods.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
Methods inherited from Request
#add_headers, #basic_auth, #content_type=, #execute_native_request, #initialize, #make_native_request
Constructor Details
This class inherits a constructor from HTTP::Request
Instance Method Details
#create_native_request ⇒ Object
61 62 63 64 65 |
# File 'lib/http_client/jruby/methods.rb', line 61 def create_native_request post = HttpPost.new(create_uri) post.entity = UrlEncodedFormEntity.new(@query_params, encoding) post end |
#create_request ⇒ Object
100 101 102 103 104 105 |
# File 'lib/http_client/mri/methods.rb', line 100 def create_request host, port, path, query = parse_uri post = Net::HTTP::Post.new(path) post.set_form_data(@params) [host, port, post] end |