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

io.vertx.up.uca.rs.argument.HeaderFiller Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.rs.argument;

import io.vertx.core.http.HttpServerRequest;
import io.vertx.ext.web.RoutingContext;
import io.vertx.up.uca.rs.Filler;
import io.vertx.up.runtime.ZeroSerializer;

public class HeaderFiller implements Filler {
    @Override
    public Object apply(final String name,
                        final Class paramType,
                        final RoutingContext context) {
        // Extract request from header
        final HttpServerRequest request = context.request();
        return ZeroSerializer.getValue(paramType, request.getHeader(name));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy