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

com.algolia.search.util.HttpStatusCodeUtils Maven / Gradle / Ivy

The newest version!
package com.algolia.search.util;

import com.algolia.search.models.HttpResponse;

public class HttpStatusCodeUtils {

  public static boolean isSuccess(HttpResponse response) {
    return isSuccess(response.getHttpStatusCode());
  }

  public static boolean isSuccess(int httpStatusCode) {
    return httpStatusCode / 100 == 2;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy