com.mashape.unirest.http.Headers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unirest-java Show documentation
Show all versions of unirest-java Show documentation
Simplified, lightweight HTTP client library
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) {
List list = get(key);
if (list != null && list.size() > 0) {
return list.get(0);
}
return null;
}
}