Dear All:
I am trying to deal with the HTTP response. I want to retrieve the
contents such as header, post, response, HTML, JSON, etc. of the HTTP
response.
(Please refer screen shot for the same.)
Please tell me how to retrieve these contents?
Thanks,
Amit.
Amit B. wrote in post #1001502:
Dear All:
I am trying to deal with the HTTP response. I want to retrieve the
contents such as header,
resp.each_header do |name, value|
puts “#{name} => #{value}”
end
puts response[‘content-type’]
post,
What is a response ‘post’?
response
The response is the response.
HTML, JSON, etc. of the HTTP
response.
puts resp.body
(Please refer screen shot for the same.)
I don’t think so.