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

Request body is saved in a non human-readable format when it contains special characters #48

Closed
MilanVasko opened this issue Jul 19, 2024 · 0 comments · Fixed by #49
Closed

Comments

@MilanVasko
Copy link

MilanVasko commented Jul 19, 2024

Hello and thank you for creating this tool, it looks very promising! The overall experience has been good so far, but I did notice an issue that's a bit inconvenient.

I've created a POST request which contains letters with diacritics in the body, such as this one:

{
  "Hello": "There",
  "Hi": "Čau"
}

If I save the request into a yaml file, the body will be saved in a hard to read format:

name: Test
method: POST
url: https://example.org/test
body:
  content: "{\n  \"Hello\": \"There\",\n  \"Hi\": \"\u010Cau\"\n}"

If I replace the Č with a regular C, the resulting yaml file will have the format that I expect:

name: Test
method: POST
url: https://example.org/test
body:
  content: |-
    {
      "Hello": "There",
      "Hi": "Cau"
    }

Is it possible to fix this? The current behavior complicates manual editing and version control diffs, so I think it might be worth looking into.

I'm using posting 1.7.0

Thanks!

darrenburns added a commit that referenced this issue Jul 19, 2024
Format request body that contains unicode as multi-line in .save_to_disk() (fix #48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant