arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
282 stars 170 forks source link

Add protocol support to WebSocketClient #121

Open emsi opened 2 years ago

emsi commented 2 years ago

Some websocket servers require protocol for proper communication. This changes adds the possibility to set the Sec-WebSocket-Protocol header while upgrading connection. The change should be 100% backward compatible.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 2 years ago

Memory usage change @ 56772a07ab7ef5e72f5a2f6ec6a2d86b75fad65e

Board flash % RAM for global variables %
arduino:samd:mkr1000 :small_red_triangle: 0 - +48 0.0 - +0.02 0 - 0 0.0 - 0.0
Click for full report table Board|examples/BasicAuthGet
flash|%|examples/BasicAuthGet
RAM for global variables|%|examples/CustomHeader
flash|%|examples/CustomHeader
RAM for global variables|%|examples/DweetGet
flash|%|examples/DweetGet
RAM for global variables|%|examples/DweetPost
flash|%|examples/DweetPost
RAM for global variables|%|examples/HueBlink
flash|%|examples/HueBlink
RAM for global variables|%|examples/PostWithHeaders
flash|%|examples/PostWithHeaders
RAM for global variables|%|examples/SimpleDelete
flash|%|examples/SimpleDelete
RAM for global variables|%|examples/SimpleGet
flash|%|examples/SimpleGet
RAM for global variables|%|examples/SimpleHttpExample
flash|%|examples/SimpleHttpExample
RAM for global variables|%|examples/SimplePost
flash|%|examples/SimplePost
RAM for global variables|%|examples/SimplePut
flash|%|examples/SimplePut
RAM for global variables|%|examples/SimpleWebSocket
flash|%|examples/SimpleWebSocket
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:samd:mkr1000|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|48|0.02|0|0.0
Click for full report CSV ``` Board,examples/BasicAuthGet
flash,%,examples/BasicAuthGet
RAM for global variables,%,examples/CustomHeader
flash,%,examples/CustomHeader
RAM for global variables,%,examples/DweetGet
flash,%,examples/DweetGet
RAM for global variables,%,examples/DweetPost
flash,%,examples/DweetPost
RAM for global variables,%,examples/HueBlink
flash,%,examples/HueBlink
RAM for global variables,%,examples/PostWithHeaders
flash,%,examples/PostWithHeaders
RAM for global variables,%,examples/SimpleDelete
flash,%,examples/SimpleDelete
RAM for global variables,%,examples/SimpleGet
flash,%,examples/SimpleGet
RAM for global variables,%,examples/SimpleHttpExample
flash,%,examples/SimpleHttpExample
RAM for global variables,%,examples/SimplePost
flash,%,examples/SimplePost
RAM for global variables,%,examples/SimplePut
flash,%,examples/SimplePut
RAM for global variables,%,examples/SimpleWebSocket
flash,%,examples/SimpleWebSocket
RAM for global variables,% arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,48,0.02,0,0.0 ```
github-actions[bot] commented 1 year ago

Memory usage change @ a56163fe1eec9a90dbf0275c3dbc19ff3762a516

Board flash % RAM for global variables %
arduino:samd:mkr1000 :small_red_triangle: 0 - +48 0.0 - +0.02 0 - 0 0.0 - 0.0
Click for full report table Board|examples/BasicAuthGet
flash|%|examples/BasicAuthGet
RAM for global variables|%|examples/CustomHeader
flash|%|examples/CustomHeader
RAM for global variables|%|examples/DweetGet
flash|%|examples/DweetGet
RAM for global variables|%|examples/DweetPost
flash|%|examples/DweetPost
RAM for global variables|%|examples/HueBlink
flash|%|examples/HueBlink
RAM for global variables|%|examples/PostWithHeaders
flash|%|examples/PostWithHeaders
RAM for global variables|%|examples/SimpleDelete
flash|%|examples/SimpleDelete
RAM for global variables|%|examples/SimpleGet
flash|%|examples/SimpleGet
RAM for global variables|%|examples/SimpleHttpExample
flash|%|examples/SimpleHttpExample
RAM for global variables|%|examples/SimplePost
flash|%|examples/SimplePost
RAM for global variables|%|examples/SimplePut
flash|%|examples/SimplePut
RAM for global variables|%|examples/SimpleWebSocket
flash|%|examples/SimpleWebSocket
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:samd:mkr1000|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|48|0.02|0|0.0
Click for full report CSV ``` Board,examples/BasicAuthGet
flash,%,examples/BasicAuthGet
RAM for global variables,%,examples/CustomHeader
flash,%,examples/CustomHeader
RAM for global variables,%,examples/DweetGet
flash,%,examples/DweetGet
RAM for global variables,%,examples/DweetPost
flash,%,examples/DweetPost
RAM for global variables,%,examples/HueBlink
flash,%,examples/HueBlink
RAM for global variables,%,examples/PostWithHeaders
flash,%,examples/PostWithHeaders
RAM for global variables,%,examples/SimpleDelete
flash,%,examples/SimpleDelete
RAM for global variables,%,examples/SimpleGet
flash,%,examples/SimpleGet
RAM for global variables,%,examples/SimpleHttpExample
flash,%,examples/SimpleHttpExample
RAM for global variables,%,examples/SimplePost
flash,%,examples/SimplePost
RAM for global variables,%,examples/SimplePut
flash,%,examples/SimplePut
RAM for global variables,%,examples/SimpleWebSocket
flash,%,examples/SimpleWebSocket
RAM for global variables,% arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,48,0.02,0,0.0 ```