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

net.craftforge.essential.context.Request Maven / Gradle / Ivy

The newest version!
/*
 * This file is part of essential.
 *
 *     essential is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     essential is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with essential.  If not, see .
 */

package net.craftforge.essential.context;

import java.io.InputStream;
import java.util.Map;

/**
 * A request provides a standard way to access HTTP request data
 * data provided by different contexts (e.g. servlet request).
 *
 * @author Christian Bick
 * @since 19.02.2011
 */
public interface Request {

    /**
     * Gets the HTTP method of the request.
     *
     * @return The HTTP method of the request
     */
    public String getHttpMethod();

    /**
     * Gets the info part of the request url. This is the part being
     * responsible for allocating resources within the framework.
     *
     * @return The info part of the request url
     */
    public String getUrlResourcePart();

    /**
     * Gets the input stream of the request body.
     *
     * @return The input stream of the request body.
     */
    public InputStream getBodyInputStream();

    /**
     * Gets the parameter map, containing all query or form
     * parameters being delivered in the request.
     *
     * @return The parameter map
     */
    public Map getParameters();

    /**
     * Gets the headers of the request.
     *
     * @return The headers as a map (keys = header names, values = header contents)
     */
    public Map getHeaders();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy