HTTP::Request POST
require "http"
req = HTTP::Request.new("POST",
"https://code-maven.com/page",
body: "name=Foo&email=foo@bar.com",
headers: HTTP::Headers{"Content-Type" => "application/x-www-form-urlencoded"})
p! req
p req.body # IO::Memory
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
require "http"
req = HTTP::Request.new("POST",
"https://code-maven.com/page",
body: "name=Foo&email=foo@bar.com",
headers: HTTP::Headers{"Content-Type" => "application/x-www-form-urlencoded"})
p! req
p req.body # IO::Memory