Skip to content

Should last_response_json() work with 'application/problem+json' content type? #782

@cgiachalis

Description

@cgiachalis

Currently last_response_json() errors with application/problem+json response:

last_response_json()
# Error in `last_response_json()`:
# ! Last response doesn't have a JSON body.

But this works:

last_response() |> resp_body_json()

A quick look at the source shows that:

  • resp_body_json() uses resp_check_content_type and
  • last_response_json() checks resp_content_type(resp) if it is "application/json"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions