Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support application/problem+json as text #1766

Closed
1 task done
kallelindqvist opened this issue Jul 15, 2023 · 2 comments · Fixed by #1769
Closed
1 task done

Support application/problem+json as text #1766

kallelindqvist opened this issue Jul 15, 2023 · 2 comments · Fixed by #1769
Labels
enhancement New feature or request
Milestone

Comments

@kallelindqvist
Copy link

kallelindqvist commented Jul 15, 2023

Problem to solve

My API returns content type application/problem+json when there is any issues. When I test with hurl --error-format long I would like to see the response body as text.
Right now I get something like:
Bytes <7b2274797065223a2261626f75743a626c616e6b222c227469746c65223a22496e7465726e616c20536572766572204572726f72222c22737461747573223a35...>

Proposal

Add application/problem+json to the list of mimetypes that can be decoded as text.

Additional context and resources

The rfc describing application/problem+json
https://datatracker.ietf.org/doc/html/rfc7807

Tasks to complete

  • Add application/problem+json to the function "is_kind_of_text" in packages/hurl/src/http/mimetypes.rs
@kallelindqvist kallelindqvist added the enhancement New feature or request label Jul 15, 2023
@jcamiel jcamiel added this to the 4.1.0 milestone Jul 16, 2023
@jcamiel
Copy link
Collaborator

jcamiel commented Jul 16, 2023

Hi @kallelindqvist you can test it now on master if you know how to build a Rust program. In any case, it'll be in the next Hurl release (certainly mid-September). Thanks for the issue,

@kallelindqvist
Copy link
Author

Hi, I have tested it now and it works.
Thanks for the quick reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants