From 2047636af81d08d20a083fdd08cc771d772eecfb Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Wed, 16 Nov 2022 13:33:19 -0600 Subject: [PATCH] [ruby/net-http] Update lib/net/http/request.rb https://github.com/ruby/net-http/commit/e3c9011edb Co-authored-by: Peter Zhu --- lib/net/http/request.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/net/http/request.rb b/lib/net/http/request.rb index 1a6e588495..f61697d1a8 100644 --- a/lib/net/http/request.rb +++ b/lib/net/http/request.rb @@ -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) # => # -# 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)