Method: Http::POST#initialize
- Defined in:
- lib/xhttp/post.rb
#initialize(url, data = {}, headers = {}) ⇒ POST
Returns a new instance of POST.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/xhttp/post.rb', line 12 def initialize(url, data={}, headers={}) @uri = URI.parse(url) @data = data @headers = headers @response_headers = {} @response_content = nil @response_status_message = nil @response_status_code = nil end |