Class: RubstApi::RedirectResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/rubst_api/responses.rb

Instance Attribute Summary

Attributes inherited from Response

#body, #headers, #media_type, #status_code

Instance Method Summary collapse

Methods inherited from Response

#delete_cookie, #finish, #render, #set_cookie

Constructor Details

#initialize(url, status_code: 307, headers: {}) ⇒ RedirectResponse

Returns a new instance of RedirectResponse.



40
41
42
# File 'lib/rubst_api/responses.rb', line 40

def initialize(url, status_code: 307, headers: {}, **)
  super("", status_code:, headers: headers.merge("location" => url))
end