method

request_via_redirect

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionDispatch::Integration::RequestHelpers

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.0.0.1) is shown here.

request_via_redirect(http_method, path, *args) public

Performs a request using the specified method, following any subsequent redirect. Note that the redirects are followed until the response is not a redirect–this means you may run into an infinite loop if your redirect loops back to itself.

Example:

request_via_redirect :post, '/welcome',
  params: { ref_id: 14 },
  headers: { "X-Test-Header" => "testvalue" }
Show source
Register or log in to add new notes.