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

Realtime SocketIO support for json user input #820

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

feydan
Copy link

@feydan feydan commented Apr 28, 2020

The SocketIo tab in realtime currently only supports string input even though the SocketIo library can support sending json data (implicitly encoding and decoding).

This change attempts to parse the user input to json in order to send it as json instead of a string. If the user input is not valid json, it will be sent as a string.

…perly emit json data. Falls back to string input
@TravisBuddy
Copy link

Hey @feydan,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 5b9b1440-898f-11ea-aae4-d3259c3e8c73

@feydan feydan changed the title Reatime SocketIO support for json user input Realtime SocketIO support for json user input Apr 28, 2020
@liyasthomas
Copy link
Member

@feydan Thank you for the quick PR, it's a nice enhancement.

@liyasthomas liyasthomas merged commit 51004da into hoppscotch:master Apr 28, 2020
@feydan feydan deleted the socketio-json-support branch April 29, 2020 00:11
@feydan
Copy link
Author

feydan commented Apr 29, 2020

Thank you for the lightning fast response!

@whyDontI
Copy link

Hey, @feydan It doesn't seem to work for me.
Data is still being sent as a string.
Can you please check once?
Let me know if I am missing something?

@feydan
Copy link
Author

feydan commented Sep 18, 2020

Hi @whyDontI . It is hard to know if you are missing something without additional context.

Are you using the SocketIO tab?
How do you know it is sending as a string?
Do you have steps to recreate the issue?

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

Successfully merging this pull request may close these issues.

None yet

4 participants