Example usage for org.apache.http.client.utils URIBuilder getFragment

List of usage examples for org.apache.http.client.utils URIBuilder getFragment

Introduction

In this page you can find the example usage for org.apache.http.client.utils URIBuilder getFragment.

Prototype

public String getFragment() 

Source Link

Usage

From source file:org.aicer.hibiscus.http.client.HttpClient.java

/**
 * A URI representing the Absolute URL for the Request
 *
 * @param uri/*from   w ww . j a v a 2s . c  o  m*/
 * @return
 */
public HttpClient setURI(final URI uri) {

    final URIBuilder builder = new URIBuilder(uri);

    this.scheme = builder.getScheme();
    this.host = builder.getHost();
    this.port = builder.getPort();
    this.path = builder.getPath();

    this.fragment = builder.getFragment();

    this.resetQueryParameters();

    for (NameValuePair nvp : builder.getQueryParams()) {
        this.queryParameters.add(new BasicNameValuePair(nvp.getName(), nvp.getValue()));
    }

    return this;
}