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

Not seeing response data #142

Open
paul-uz opened this issue Aug 2, 2022 · 2 comments
Open

Not seeing response data #142

paul-uz opened this issue Aug 2, 2022 · 2 comments

Comments

@paul-uz
Copy link

paul-uz commented Aug 2, 2022

For example, on my $connect handler, I return

{ statusCode: 200, body: 'Connected' }

But when I connect via wscat, I'm not seeing the body text in the terminal.

@lpinca
Copy link
Member

lpinca commented Dec 17, 2022

What you mean with "$connect handler"? To get that data, the WebSocket server that wscat connects to should send a message like this

websocket.send(JSON.stringify({ statusCode: 200, body: 'Connected' }));

@razvanphp
Copy link

I wanted to add an issue for not showing the error messages in the body, for example in this case:

error: Unexpected server response: 500
>

when using curl, I get the real error in the body like:

{"message":"Unable to find ....

Maybe I can prepare a PR, if the project is still maintained...

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

No branches or pull requests

3 participants