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

gridscale.http.methods.HttpSearch Maven / Gradle / Ivy

There is a newer version: 2.53
Show newest version
/*
 * copyright(c) 2014 SAS Institute, Cary NC 27513 Created on Oct 22, 2014
 */
package gridscale.http.methods;

import org.apache.http.HttpHeaders;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

import java.net.URI;

/**
 * @author Gary Williams
 */
public class HttpSearch
	extends HttpEntityEnclosingRequestBase
{
	public static final String METHOD_NAME = "SEARCH";
	
	public HttpSearch(final String uri)
	{
		this(URI.create(uri));
	}
	
	public HttpSearch(final URI uri)
	{
		this.setURI(uri);
		this.setHeader(HttpHeaders.CONTENT_TYPE, "text/xml; charset=utf-8");
	}
	
	@Override
	public String getMethod()
	{
		return METHOD_NAME;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy