Example usage for io.vertx.core.http HttpClientRequest writeCustomFrame

List of usage examples for io.vertx.core.http HttpClientRequest writeCustomFrame

Introduction

In this page you can find the example usage for io.vertx.core.http HttpClientRequest writeCustomFrame.

Prototype

@Fluent
HttpClientRequest writeCustomFrame(int type, int flags, Buffer payload);

Source Link

Document

Write an HTTP/2 frame to the request, allowing to extend the HTTP/2 protocol.<p> The frame is sent immediatly and is not subject to flow control.<p> This method must be called after the request headers have been sent and only for the protocol HTTP/2.

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example9(HttpClientRequest request) {

    int frameType = 40;
    int frameStatus = 10;
    Buffer payload = Buffer.buffer("some data");

    // Sending a frame to the server
    request.writeCustomFrame(frameType, frameStatus, payload);
}