Class: Slanger::Api::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/slanger/api/server.rb

Instance Method Summary collapse

Instance Method Details

#valid_requestObject



48
49
50
51
52
53
# File 'lib/slanger/api/server.rb', line 48

def valid_request
  @valid_request ||= begin
      request_body ||= request.body.read.tap { |s| s.force_encoding("utf-8") }
      RequestValidation.new(request_body, params, env["PATH_INFO"])
    end
end