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

io.femo.http.HttpException 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;

import java.io.PrintStream;

/**
 * Created by felix on 1/19/16.
 */
public class HttpException extends RuntimeException {

    private HttpRequest request;

    public HttpException(HttpRequest request, Exception cause) {
        super(cause);
        this.request = request;
    }

    public HttpException(HttpRequest request, String message) {
        super(message);
        this.request = request;
    }

    @Override
    public void printStackTrace(PrintStream printStream) {
        if(request != null)
            request.print(printStream);
        super.printStackTrace(printStream);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy