def format_post(path, params)
      Net::HTTP::Post.new(path).tap { |request| request.set_form_data(params) }
    end
def format_post(path, params)
      Net::HTTP::Post.new(path).tap { |request| request.set_form_data(params) }
    end
Internal: Format and create a Net::HTTP post request, with form
 parameters.

 path - the path to get
 params - the params to add as form params to the path

 Examples

   format_post("/api/v2/document/upload",
              { :token => <token>, :url => <url> })
   # => <Net::HTTP::Post:<id>>

 Returns a Net::HTTP::Post object for the path with form params