Hoppscotch: Allow reserved characters on websocket URI

Created on 8 Nov 2019  路  4Comments  路  Source: hoppscotch/hoppscotch

I've tried to utilize the Websocket client to request some data to Binance Exchange API, using the URI shown below:

wss://stream.binance.com:9443/ws/ethusdt@kline_15m

The problem is that the presence of '@' disables the connect button, interpreting as a non-valid character for WSS URIs. As mentioned in RFC 6455 and 3986, the '@' symbol is do part of the reserved character's group, but this doesn't turns into an invalid URI.

I do agree that Binance API syntax may not fully implement the RFC, where it should be accepting the percent-encoded alias of '@', which is %40. But I also think that the client should not be filtering reserved characters, denying me to a send a request to a malformed API.

On a daily basis, I establish a bunch of wss connections to similar endpoints on a micro service implementation using gorilla/websocket, I can guarantee these are accepted URIs.

I have to say this is mine interpretation of the RFC, and as an inexperienced developer I could be equivocated. I'ld be glad to receive your feedback if that's the case.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Postwoman
  2. Click on 'WebSocket'
  3. Try to establish a connection to the example URI

Desktop

  • OS: Ubuntu 18.04 LTS
  • Browser: Firefox
  • npm version output
{ postwoman: '1.0.0',
  npm: '3.5.2',
  ares: '1.14.0',
  cldr: '32.0.1',
  http_parser: '2.7.1',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.30.0',
  node: '8.10.0',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.18.0',
  v8: '6.2.414.50',
  zlib: '1.2.11' }
bug

All 4 comments

Will fix it ASAP

Just pushed a quick fix for this issue. Please verify and let me know whether there's any issues persist.

postwoman io_websocket

Thanks very much! Just updated, tested, and it's all good. Glad to see you're implementing a regex parser yourself, and not importing it from an "obscure" dependency.

Glad it worked out!
btw, there was a text overflowing issue with large single ling responses such as the one you mentioned. You bug report helped me find and fix that too. It's now fixed. Enjoy PW. Star the project, share among your friends/teams!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NBTX picture NBTX  路  4Comments

QasimArif picture QasimArif  路  4Comments

jitendra3109 picture jitendra3109  路  3Comments

Siccity picture Siccity  路  3Comments

KJohn2q picture KJohn2q  路  4Comments