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

colesico.framework.telehttp.origin.HeaderOrigin Maven / Gradle / Ivy

package colesico.framework.telehttp.origin;

import colesico.framework.http.HttpContext;
import colesico.framework.telehttp.Origin;

import javax.inject.Provider;
import javax.inject.Singleton;

@Singleton
public class HeaderOrigin implements Origin {

    private final Provider httpContextProv;

    public HeaderOrigin(Provider httpContextProv) {
        this.httpContextProv = httpContextProv;
    }

    @Override
    public String getString(String name) {
       return httpContextProv.get().getRequest().getHeaders().get(name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy