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

com.greenpepper.shaded.org.jsoup.HttpStatusException Maven / Gradle / Ivy

There is a newer version: 4.2.4
Show newest version
package com.greenpepper.shaded.org.jsoup;

import java.io.IOException;

/**
 * Signals that a HTTP request resulted in a not OK HTTP response.
 */
public class HttpStatusException extends IOException {
    private int statusCode;
    private String url;

    public HttpStatusException(String message, int statusCode, String url) {
        super(message);
        this.statusCode = statusCode;
        this.url = url;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public String getUrl() {
        return url;
    }

    @Override
    public String toString() {
        return super.toString() + ". Status=" + statusCode + ", URL=" + url;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy