lib/aws_lambda_ric/aws_lambda_marshaller.rb
def marshall_response(method_response)
        case method_response
        when StringIO, IO
          [method_response, 'application/unknown']
        else
          method_response.to_json # application/json is assumed
        end
      end
# By default, just runs #to_json on the method's response value.
# This can be overwritten by users who know what they are doing.
# The response is an array of response, content-type.
# If returned without a content-type, it is assumed to be application/json
# Finally, StringIO/IO is used to signal a response that shouldn't be
# formatted as JSON, and should get a different content-type header.
By default, just runs #to_json on the method's response value.
This can be overwritten by users who know what they are doing.
The response is an array of response, content-type.
If returned without a content-type, it is assumed to be application/json
Finally, StringIO/IO is used to signal a response that shouldn't be
formatted as JSON, and should get a different content-type header.
By default just runs #to_json on the method ' s response value . This can be overwritten by users who know what they are doing . The response is an array of response content - type . If returned without a content - type it is assumed to be application / json Finally StringIO / IO is used to signal a response that shouldn ' t be formatted as JSON and should get a different content - type header .
def marshall_response(method_response)
        case method_response
        when StringIO, IO
          [method_response, 'application/unknown']
        else
          method_response.to_json 
        end
      end
def marshall_response ( method_response ) case method_response when StringIO , IO [ method_response , 'application/unknown' ] else method_response . to_json end end
By default, just runs #to_json on the method's response value.
By default just runs #to_json on the method ' s response value .
# application/json is assumed
method_response