lib/jets/mega/request.rb in jets-4.0.12 vs lib/jets/mega/request.rb in jets-5.0.0.beta1

- old
+ new

@@ -12,18 +12,18 @@ @controller = controller # Jets::Controller instance end def proxy http_method = @event['httpMethod'] # GET, POST, PUT, DELETE, etc - params = @controller.params(raw: true, path_parameters: false) + params = @controller.params(include_path_params: false) uri = get_uri http = Net::HTTP.new(uri.host, uri.port) http.open_timeout = http.read_timeout = 60 - # Rails sets _method=patch or _method=put as workaround + # Jets sets _method=patch or _method=put as workaround # Falls back to GET when testing in lambda console http_class = params['_method'] || http_method || 'GET' http_class.capitalize! request_class = "Net::HTTP::#{http_class}".constantize # IE: Net::HTTP::Get @@ -113,20 +113,20 @@ def source Source.new(@event) end memoize :source - # Rails sets _method=patch or _method=put as workaround + # Jets sets _method=patch or _method=put as workaround # Falls back to GET when testing in lambda console # @event['httpMethod'] is GET, POST, PUT, DELETE, etc def http_class http_class = params['_method'] || @event['httpMethod'] || 'GET' http_class.capitalize! http_class end def params - @controller.params(raw: true, path_parameters: false, body_parameters: true) + @controller.params(include_path_params: false, include_body_params: true) end memoize :params # Set request headers. Forwards original request info from remote API gateway. # By this time, the server/api_gateway.rb middleware.