sumo_rest icon indicating copy to clipboard operation
sumo_rest copied to clipboard

Fails with content_type_accepted utf8

Open Euen opened this issue 7 years ago • 1 comments

when the content-type is like application/json; charset=utf8 sumo_rest fails in sr_entities_handler:content_types_accepted/2

Example

Headers = #{ basic_auth => {Name, "pwd"}
             , <<"content-type">> => <<"application/json; charset=utf8">>
             },

  ct:comment("Create the session"),
  #{status_code := 201,
           body := RespBody} =
    lsl_test_utils:api_call(post, "/sessions", Headers),

Euen avatar Jul 14 '17 21:07 Euen

For context, this happens when the endpoint consumes "application/json" according to its swagger documentation. On Fri, Jul 14, 2017 at 18:41 Euen [email protected] wrote:

when the content-type is like application/json; charset=utf8 sumo_rest fails in sr_entities_handler:content_types_accepted/2

Example

Headers = #{ basic_auth => {Name, "pwd"} , <<"content-type">> => <<"application/json; charset=utf8">> },

ct:comment("Create the session"), #{status_code := 201, body := RespBody} = lsl_test_utils:api_call(post, "/sessions", Headers),

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/inaka/sumo_rest/issues/101, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFt2eu0DptjPkqADEIq8QD4pUVaOixyks5sN-CLgaJpZM4OYxXX .

-- Brujo Benavides (CTO @ Inaka) From my iPhone

elbrujohalcon avatar Jul 14 '17 21:07 elbrujohalcon