return webSocketUpgradeRequest(path, "13");
}
private static FullHttpRequest webSocketUpgradeRequest(final String path, final String version) {
final FullHttpRequest req = new DefaultFullHttpRequest(HTTP_1_1, GET, path);
req.headers().set(HOST, "server.test.com");
req.headers().set(UPGRADE, WEBSOCKET.toString());
req.headers().set(CONNECTION, "Upgrade");
req.headers().set(SEC_WEBSOCKET_KEY, "dGhlIHNhbXBsZSBub25jZQ==");
req.headers().set(SEC_WEBSOCKET_ORIGIN, "http://test.com");
req.headers().set(SEC_WEBSOCKET_VERSION, version);