Skip to content

Add format body option#847

Merged
AndrewBastin merged 3 commits intohoppscotch:masterfrom
sboulema:feature/add-format-body-option-#767
May 7, 2020
Merged

Add format body option#847
AndrewBastin merged 3 commits intohoppscotch:masterfrom
sboulema:feature/add-format-body-option-#767

Conversation

@sboulema
Copy link
Copy Markdown
Contributor

@sboulema sboulema commented May 6, 2020

Adds a button to prettify the json request body.

Prettify

Shows a toast error if the body isn't a proper json string.

This PR fixes #767.

@sboulema sboulema mentioned this pull request May 6, 2020
@TravisBuddy
Copy link
Copy Markdown

Hey @sboulema,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: f789d8f0-8fcf-11ea-a26d-2bd2cd942036

Copy link
Copy Markdown
Contributor

@AndrewBastin AndrewBastin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature addition!

But it looks like you haven't handled the case in which the content type isn't JSON.
Add code to hide the button if the content-type isn't a JSON one.

@AndrewBastin AndrewBastin added the feature New feature or request label May 6, 2020
@AndrewBastin AndrewBastin added this to the v2.0 milestone May 6, 2020
@sboulema sboulema requested a review from AndrewBastin May 6, 2020 21:03
@TravisBuddy
Copy link
Copy Markdown

Hey @sboulema,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 471b0940-8fdd-11ea-a26d-2bd2cd942036

@sboulema
Copy link
Copy Markdown
Contributor Author

sboulema commented May 6, 2020

Thanks for the review, very valid comment!

Button is now hidden for non JSON bodies

liyasthomas
liyasthomas previously approved these changes May 7, 2020
@TravisBuddy
Copy link
Copy Markdown

Hey @sboulema,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: bf7df910-9032-11ea-931a-79bfa81bc315

Copy link
Copy Markdown
Contributor

@AndrewBastin AndrewBastin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@AndrewBastin AndrewBastin merged commit 7e3c775 into hoppscotch:master May 7, 2020
@sboulema sboulema deleted the feature/add-format-body-option-#767 branch May 7, 2020 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Format Body option

4 participants