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

cn.vertxup.api.Ix Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package cn.vertxup.api;

import io.vertx.core.Future;
import io.vertx.core.http.HttpStatusCode;
import io.vertx.up.aiki.Ux;
import io.vertx.up.atom.Envelop;

interface Http {
    /* 201 */
    static  Future success201(final T entity) {
        return Ux.toFuture(Envelop.success(entity, HttpStatusCode.CREATED));
    }

    /* 200 */
    static  Future success200(final T entity) {
        return Ux.toFuture(Envelop.success(entity));
    }

    /* 204 */
    static  Future success204(final T entity) {
        return Ux.toFuture(Envelop.success(entity, HttpStatusCode.NO_CONTENT));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy