rename init function to websocket_init and add init function for custom headers of request