class Pragma::Operation::Response::Unauthorized
Represents the 401 Unauthorized
HTTP response.
Public Class Methods
new( entity: Error.new( error_type: :unauthorized, error_message: 'This resource requires authentication.' ), headers: {} )
click to toggle source
Initializes the response.
@param entity [Object] the response's entity @param headers [Hash] the response's headers
Calls superclass method
Pragma::Operation::Response::new
# File lib/pragma/operation/response/unauthorized.rb, line 12 def initialize( entity: Error.new( error_type: :unauthorized, error_message: 'This resource requires authentication.' ), headers: {} ) super(status: 401, entity: entity, headers: headers) end