[ruby/net-http] Update lib/net/http/request.rb

https://github.com/ruby/net-http/commit/e3c9011edb

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
This commit is contained in:
Burdette Lamar 2022-11-16 13:33:19 -06:00 коммит произвёл Peter Zhu
Родитель dbb902fc91
Коммит 2047636af8
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -54,12 +54,10 @@
#
# A POST request may be sent using request class \Net::HTTP::Post:
#
# json = {title: 'foo', body: 'bar', userId: 1}
# # => "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":1}"
# _uri = uri.dup
# _uri.path = '/posts'
# req = Net::HTTP::Post.new(_uri) # => #<Net::HTTP::Post POST>
# req.body = json
# req.body = '{"title": "foo", "body": "bar", "userId": 1}'
# req['Content-type'] = 'application/json; charset=UTF-8'
# Net::HTTP.start(hostname) do |http|
# http.request(req)