All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blade.mvc.http.RawBody Maven / Gradle / Ivy

package com.blade.mvc.http;

import io.netty.handler.codec.http.DefaultHttpResponse;
import io.netty.handler.codec.http.FullHttpResponse;

public class RawBody implements Body {

    private FullHttpResponse    httpResponse;
    private DefaultHttpResponse defaultHttpResponse;

    public RawBody(FullHttpResponse httpResponse) {
        this.httpResponse = httpResponse;
    }

    public RawBody(DefaultHttpResponse defaultHttpResponse) {
        this.defaultHttpResponse = defaultHttpResponse;
    }

    public FullHttpResponse httpResponse() {
        return httpResponse;
    }

    public DefaultHttpResponse defaultHttpResponse() {
        return defaultHttpResponse;
    }

    @Override
    public FullHttpResponse write(BodyWriter writer) {
        return writer.onRawBody(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy