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

Add format body option #847

Merged

Conversation

sboulema
Copy link
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

Hey @sboulema,
Your changes look good to me!

View build log

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

Copy link
Member

@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

Hey @sboulema,
Your changes look good to me!

View build log

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

@sboulema
Copy link
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
pages/index.vue Outdated Show resolved Hide resolved
@TravisBuddy
Copy link

Hey @sboulema,
Your changes look good to me!

View build log

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

Copy link
Member

@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