Cro::MediaType can't parse AWS content types.
Closed this issue · 0 comments
jonathanstowe commented
This is kind of alluded to in #7 but I thought I'd make it more explicit now that I have an actual example in the wild.
The AWS Secrets Manager, DynamoDB and probably others require a content-type of application/x-amz-json-1.1
in requests and respond with the same content-type.
Unfortunately this gives rise to X::Cro::MediaType::Invalid
when creating the request and when requesting the body from the response.
The only workaround I have found is to replace both the BodySerializers and BodyParsers with ones that ignore the content type when creating the Cro::HTTP::Client
(which is fine in a library, but might be a bit of a faff if one wanted to re-use the client.)