Package ratpack.http

Examples of ratpack.http.TypedData


    @Override
    public void execute(Execution execution) throws Exception {
      HttpClients.httpClient(execController, UnpooledByteBufAllocator.DEFAULT, Integer.MAX_VALUE).request(uri, action)
        .then(response -> {
          TypedData responseBody = response.getBody();
          ByteBuf responseBodyBuffer = responseBody.getBuffer();
          responseBodyBuffer = Unpooled.unreleasableBuffer(responseBodyBuffer.retain());
          ReceivedResponse copiedResponse = new DefaultReceivedResponse(
            response.getStatus(),
            response.getHeaders(),
            new ByteBufBackedTypedData(responseBodyBuffer, responseBody.getContentType())
          );
          setResult(Result.success(copiedResponse));
        });
    }
View Full Code Here

TOP

Related Classes of ratpack.http.TypedData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.