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

com.amazon.redshift.plugin.utils.ResponseUtils Maven / Gradle / Ivy

There is a newer version: 2.1.0.30
Show newest version
package com.amazon.redshift.plugin.utils;

import org.apache.http.NameValuePair;

import java.util.List;

/**
 * Http Request/Response utils.
 */
public class ResponseUtils
{

    private ResponseUtils()
    {
    }

    /**
     * Find parameter by name in http request/response  {@link NameValuePair} List.
     * 
     * @param name name of the parameter
     * @param list list of parameters
     * @return returns value of the found parameter, otherwise null.
     */
    public static String findParameter(String name, List list)
    {
        for (NameValuePair pair : list)
        {
            if (name.equals(pair.getName()))
            {
                return pair.getValue();
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy