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

org.smartboot.http.client.HeaderWrapper Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package org.smartboot.http.client;

/**
 * @author 三刀([email protected])
 * @version V1.0 , 2023/2/13
 */
class HeaderWrapper implements Header {
    private final T rest;

    private final Header header;

    public HeaderWrapper(T rest, Header header) {
        this.rest = rest;
        this.header = header;
    }

    @Override
    public Header add(String headerName, String headerValue) {
        header.add(headerName, headerValue);
        return this;
    }

    @Override
    public Header set(String headerName, String headerValue) {
        header.set(headerName, headerValue);
        return this;
    }

    @Override
    public Header setContentType(String contentType) {
        header.setContentType(contentType);
        return this;
    }

    @Override
    public Header setContentLength(int contentLength) {
        header.setContentLength(contentLength);
        return this;
    }

    @Override
    public T done() {
        return rest;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy