lib/grape/endpoint.rb
# Set or retrieve the HTTP status code.
Set or retrieve the HTTP status code.
Set or retrieve the HTTP status code .
def status(status = nil)
      if status
        @status = status
      else
        return @status if @status
        case request.request_method.to_s.upcase
          when 'POST'
            201
          else
            200
        end
      end        
    end
def status ( status = nil ) if status @status = status else return @status if @status case request . request_method . to_s . upcase when 'POST' 201 else 200 end end end
Set or retrieve the HTTP status code.
Set or retrieve the HTTP status code .
status
<not_specific>