We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4444e8c commit e3c9011Copy full SHA for e3c9011
lib/net/http/request.rb
@@ -54,12 +54,10 @@
54
#
55
# A POST request may be sent using request class \Net::HTTP::Post:
56
57
-# json = {title: 'foo', body: 'bar', userId: 1}
58
-# # => "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":1}"
59
# _uri = uri.dup
60
# _uri.path = '/posts'
61
# req = Net::HTTP::Post.new(_uri) # => #<Net::HTTP::Post POST>
62
-# req.body = json
+# req.body = '{"title": "foo", "body": "bar", "userId": 1}'
63
# req['Content-type'] = 'application/json; charset=UTF-8'
64
# Net::HTTP.start(hostname) do |http|
65
# http.request(req)
0 commit comments