Makes a simple HTTP POST request to the specified URL. This is a convenience method to avoid having to construct a Request object manually. If your request needs to specify particular headers or cookies then constructing a Request object will be required. as Text, content as Object, optional timeout as Integer) as Response


  • url: Text object. The URL to make the POST request to
  • content: Any object. The object will be converted to text before being assigned to the request’s content
  • timeout: Optional integer Number object. The number of seconds to wait before assuming that the request timed out. If not specified then a value of 10 seconds is used



var content = {"title" => "foo", "body" => "bar", "userId" => 1}
var response ="", content)
JSON.parse(response.body) # {"id" => 101}