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

cn.hserver.client.http.HttpReq Maven / Gradle / Ivy

There is a newer version: 3.5.M5
Show newest version
package cn.hserver.client.http;

import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpMethod;

public class HttpReq {

    private HttpMethod method;
    private int timeout;

    private HttpHeaders httpHeaders;

    private String uri;


    public HttpMethod getMethod() {
        return method;
    }

    public int getTimeout() {
        return timeout;
    }

    public HttpHeaders getHttpHeaders() {
        return httpHeaders;
    }

    public String getUri() {
        return uri;
    }

    public HttpReq setMethod(HttpMethod method) {
        this.method = method;
        return this;
    }

    public HttpReq setTimeout(int i) {
        this.method = method;
        return this;
    }

    public HttpReq setHeader(String s, String s1) {
        if (httpHeaders == null) {
            httpHeaders = new DefaultHttpHeaders();
        }
        httpHeaders.add(s, s1);
        return this;
    }
    public HttpReq setUri(String s) {
        this.uri = s;
        return this;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy