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

be.wegenenverkeer.rxhttpclient.ServerResponseStatus Maven / Gradle / Ivy

The newest version!
package be.wegenenverkeer.rxhttpclient;

import java.util.Optional;
import java.util.function.Function;

/**
 * The HTTP Response Status
 * Created by Karel Maesen, Geovise BVBA on 18/12/14.
 */
public interface ServerResponseStatus extends ServerResponseElement {

    /**
     * Returns the status code of the response
     * @return the status code of the response
     */
    public int getStatusCode();

    /**
     * Returns the option status text
     * @return the option status text
     */
    public Optional  getStatusText();

    /**
     * {@inheritDoc}
     */
    @Override
    default  T match(Function matchStatus,
                Function matchHeaders,
                Function matchBodyPart,
                Function matchServerResponse) {
        return matchStatus.apply(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy