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

com.github.fashionbrot.ribbon.util.HttpResult Maven / Gradle / Ivy

Go to download

mars-ribbon-api 负载均衡工具 https://github.com/fashionbrot/mars-dynamic-config

There is a newer version: 0.1.3
Show newest version
package com.github.fashionbrot.ribbon.util;

import lombok.Data;

/**
 * @author guoran.sun
 * @date 2019/12/17 12:35
 */
@Data
public class HttpResult {

    public int code;
    public String content;

    public boolean isSuccess(){
        return 200 == this.code;
    }
    public boolean isFail(){
        if (200 == this.code){
            return false;
        }
        if (404 == this.code || 500 == this.code){
            return true;
        }
        return true;
    }

    HttpResult(int code, String content) {
        this.code = code;
        this.content = content;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy