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

io.femo.http.HttpHandleException Maven / Gradle / Ivy

Go to download

An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request. On android only asynchronous driver is supported. This library has been backported to jdk 7 to retain compatibility with android!

The newest version!
package io.femo.http;

/**
 * Created by felix on 4/25/16.
 */
public class HttpHandleException extends Exception {

    private StatusCode statusCode;

    public HttpHandleException(StatusCode statusCode) {
        super();
        this.statusCode = statusCode;
    }

    public HttpHandleException(StatusCode statusCode, String message) {
        super(message);
        this.statusCode = statusCode;
    }

    public HttpHandleException(StatusCode statusCode, String s, Throwable throwable) {
        super(s, throwable);
        this.statusCode = statusCode;
    }

    public HttpHandleException() {
        this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
    }

    public HttpHandleException(String s) {
        super(s);
        this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
    }

    public HttpHandleException(String s, Throwable throwable) {
        super(s, throwable);
        this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
    }

    public StatusCode getStatusCode() {
        return statusCode;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy