Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

uncommented change, added header update blurb

  • Loading branch information...
commit d6fdfccf94ae585bf55ac6e8019bf97c7692e987 1 parent be6408a
@perzeababa perzeababa authored committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 post_form.rb
View
4 post_form.rb
@@ -11,6 +11,8 @@
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data({"q" => "My query", "per_page" => "50"})
-#request["Content-Type"] = "application/json"
+
+# Tweak headers, removing this will default to application/x-www-form-urlencoded
+request["Content-Type"] = "application/json"
response = http.request(request)
Please sign in to comment.
Something went wrong with that request. Please try again.