hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <...@odi.ch>
Subject Re: [HttpClient] Adding fragment to the request URL
Date Tue, 13 Mar 2007 09:55:05 GMT

The # character is reserved to separate the fragment from the 
query/path. The fragment is not intended to be sent over the wire. So if 
you want to include such a character in an URI you should URL-escape it 
with %23:


Does that work for you?


keith chapman wrote:
> Hi,
> I want to send a http GET request to the followin url
> http://localhost:8081/axis2/services/ProbeDataService.RawParameterEndpoint/RawParameter#id

> But i have to set a URI to the getMethod.
> I have the above as a URL. So I do the following
> getMethod.setURI(url.toString);
> This rips off the fragment part resulting in the following target URL
> http://localhost:8081/axis2/services/ProbeDataService.RawParameterEndpoint/RawParamete

> How can I send a fragment in the url?
> Thanks,
> Keith

[web]  http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp]  key 0x81CF3416
        finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416

To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org

View raw message