URIUtils.RewriteURI Method

Definition

Overloads

Name Description
RewriteURI(URI, HttpHost)

A convenience method for creating a new URI whose scheme, host and port are taken from the target host, but whose path, query and fragment are taken from the existing URI.

RewriteURI(URI, HttpHost, Boolean)

A convenience method for creating a new URI whose scheme, host and port are taken from the target host, but whose path, query and fragment are taken from the existing URI.

RewriteURI(URI, HttpHost)

A convenience method for creating a new URI whose scheme, host and port are taken from the target host, but whose path, query and fragment are taken from the existing URI.

[Android.Runtime.Register("rewriteURI", "(Ljava/net/URI;Lorg/apache/http/HttpHost;)Ljava/net/URI;", "")]
public static Java.Net.URI? RewriteURI(Java.Net.URI? uri, Org.Apache.Http.HttpHost? target);
[<Android.Runtime.Register("rewriteURI", "(Ljava/net/URI;Lorg/apache/http/HttpHost;)Ljava/net/URI;", "")>]
static member RewriteURI : Java.Net.URI * Org.Apache.Http.HttpHost -> Java.Net.URI

Parameters

uri
URI

Contains the path, query, and fragment to use.

target
HttpHost

Contains the scheme, host, and port to use.

Returns

URI

A URI containing the path, query, and fragment from uri and, when target is not null, its scheme, host, and port.

Attributes

Exceptions

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

RewriteURI(URI, HttpHost, Boolean)

A convenience method for creating a new URI whose scheme, host and port are taken from the target host, but whose path, query and fragment are taken from the existing URI.

[Android.Runtime.Register("rewriteURI", "(Ljava/net/URI;Lorg/apache/http/HttpHost;Z)Ljava/net/URI;", "")]
public static Java.Net.URI? RewriteURI(Java.Net.URI? uri, Org.Apache.Http.HttpHost? target, bool dropFragment);
[<Android.Runtime.Register("rewriteURI", "(Ljava/net/URI;Lorg/apache/http/HttpHost;Z)Ljava/net/URI;", "")>]
static member RewriteURI : Java.Net.URI * Org.Apache.Http.HttpHost * bool -> Java.Net.URI

Parameters

uri
URI

Contains the path, query and fragment to use.

target
HttpHost

Contains the scheme, host and port to use.

dropFragment
Boolean

True if the fragment should not be copied.

Returns

URI

A URI containing the path and query from uri, its fragment unless dropFragment is true, and the scheme, host, and port from target when it is not null.

Attributes

Exceptions

If the resulting URI is invalid.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to