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

com.mashape.unirest.http.Headers Maven / Gradle / Ivy

There is a newer version: 1.4.9
Show newest version
package com.mashape.unirest.http;

import java.util.HashMap;
import java.util.List;

public class Headers extends HashMap> {

	private static final long serialVersionUID = 71310341388734766L;

	public String getFirst(Object key) {
		Object lowerCasedKey = key instanceof String ? ((String)key).toLowerCase() : key;
		List list = get(lowerCasedKey);
		if (list != null && list.size() > 0) {
			return list.get(0);
		}
		return null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy