Skip to content

Loss of content type  #7

@armandopadilla

Description

@armandopadilla

First of all, nice work.

I spotted an issue with the loss of the Content Type within the AkkaHttpLambdaHandler.proxyToAkkaRequest method.

What happens.

  1. User makes a request with Content-Type set to 'application/json' (can be anything really).
  2. Code recreates the HttpRequest by using HttpEntity.apply on the body.
  3. The above step results in the below, which can show the loss of the content-type.

HttpEntity.Strict(text/plain; charset=UTF-8,{
"name": "ArmandoPadilla"
})

From the Akka-http perspective. This causes issues when using entity[as[JsValue]] which results in.

The request's Content-Type is not supported. Expected:
application/json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions