IHttpClient.Execute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Execute(IHttpUriRequest) |
Executes a request to the target using the given context. |
| Execute(IHttpUriRequest, IResponseHandler) |
Executes a request using the default context and processes the response using the given response handler. |
| Execute(IHttpUriRequest, IHttpContext) |
Executes a request using the given context. |
| Execute(HttpHost, IHttpRequest) |
Executes a request to the target using the default context. |
| Execute(IHttpUriRequest, IResponseHandler, IHttpContext) |
Executes a request using the given context and processes the response using the given response handler. |
| Execute(HttpHost, IHttpRequest, IResponseHandler) |
Executes a request to the target using the default context and processes the response using the given response handler. |
| Execute(HttpHost, IHttpRequest, IHttpContext) |
Executes a request to the target using the given context. |
| Execute(HttpHost, IHttpRequest, IResponseHandler, IHttpContext) |
Executes a request to the target using the given context and processes the response using the given response handler. |
Execute(IHttpUriRequest)
Executes a request to the target using the given context.
[Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.Apache.Http.IHttpResponse? Execute(Org.Apache.Http.Client.Methods.IHttpUriRequest? request);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Execute : Org.Apache.Http.Client.Methods.IHttpUriRequest -> Org.Apache.Http.IHttpResponse
Parameters
- request
- IHttpUriRequest
the request to execute
Returns
The final response to the request. It is never an intermediate response with a 1xx status code. Whether redirects or authentication challenges are returned or handled automatically depends on the client implementation and configuration.
- Attributes
Exceptions
in case of a problem or the connection was aborted
in case of an http protocol error
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
Execute(IHttpUriRequest, IResponseHandler)
Executes a request using the default context and processes the response using the given response handler.
[Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/client/ResponseHandler;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_client_ResponseHandler_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? Execute(Org.Apache.Http.Client.Methods.IHttpUriRequest? request, Org.Apache.Http.Client.IResponseHandler? responseHandler);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/client/ResponseHandler;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_client_ResponseHandler_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member Execute : Org.Apache.Http.Client.Methods.IHttpUriRequest * Org.Apache.Http.Client.IResponseHandler -> Java.Lang.Object
Parameters
- request
- IHttpUriRequest
The request to execute.
- responseHandler
- IResponseHandler
The response handler.
Returns
The response object generated by the response handler.
- Attributes
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
Execute(IHttpUriRequest, IHttpContext)
Executes a request using the given context.
[Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.Apache.Http.IHttpResponse? Execute(Org.Apache.Http.Client.Methods.IHttpUriRequest? request, Org.Apache.Http.Protocol.IHttpContext? context);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Execute : Org.Apache.Http.Client.Methods.IHttpUriRequest * Org.Apache.Http.Protocol.IHttpContext -> Org.Apache.Http.IHttpResponse
Parameters
- request
- IHttpUriRequest
the request to execute
- context
- IHttpContext
the context to use for the execution, or
null to use the default context
Returns
The final response to the request. It is never an intermediate response with a 1xx status code. Whether redirects or authentication challenges are returned or handled automatically depends on the client implementation and configuration.
- Attributes
Exceptions
in case of a problem or the connection was aborted
in case of an http protocol error
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
Execute(HttpHost, IHttpRequest)
Executes a request to the target using the default context.
[Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.Apache.Http.IHttpResponse? Execute(Org.Apache.Http.HttpHost? target, Org.Apache.Http.IHttpRequest? request);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Execute : Org.Apache.Http.HttpHost * Org.Apache.Http.IHttpRequest -> Org.Apache.Http.IHttpResponse
Parameters
- target
- HttpHost
the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.
- request
- IHttpRequest
the request to execute
Returns
The final response to the request. It is never an intermediate response with a 1xx status code. Whether redirects or authentication challenges are returned or handled automatically depends on the client implementation and configuration.
- Attributes
Exceptions
in case of a problem or the connection was aborted
in case of an http protocol error
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
Execute(IHttpUriRequest, IResponseHandler, IHttpContext)
Executes a request using the given context and processes the response using the given response handler.
[Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/client/ResponseHandler;Lorg/apache/http/protocol/HttpContext;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_client_ResponseHandler_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? Execute(Org.Apache.Http.Client.Methods.IHttpUriRequest? request, Org.Apache.Http.Client.IResponseHandler? responseHandler, Org.Apache.Http.Protocol.IHttpContext? context);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/client/ResponseHandler;Lorg/apache/http/protocol/HttpContext;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_client_methods_HttpUriRequest_Lorg_apache_http_client_ResponseHandler_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member Execute : Org.Apache.Http.Client.Methods.IHttpUriRequest * Org.Apache.Http.Client.IResponseHandler * Org.Apache.Http.Protocol.IHttpContext -> Java.Lang.Object
Parameters
- request
- IHttpUriRequest
The request to execute.
- responseHandler
- IResponseHandler
The response handler.
- context
- IHttpContext
The context to use for the execution, or null to use the default context.
Returns
The response object generated by the response handler.
- Attributes
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
Execute(HttpHost, IHttpRequest, IResponseHandler)
Executes a request to the target using the default context and processes the response using the given response handler.
[Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/client/ResponseHandler;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_client_ResponseHandler_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? Execute(Org.Apache.Http.HttpHost? target, Org.Apache.Http.IHttpRequest? request, Org.Apache.Http.Client.IResponseHandler? responseHandler);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/client/ResponseHandler;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_client_ResponseHandler_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member Execute : Org.Apache.Http.HttpHost * Org.Apache.Http.IHttpRequest * Org.Apache.Http.Client.IResponseHandler -> Java.Lang.Object
Parameters
- target
- HttpHost
The target host for the request. Implementations may accept null when they can still determine a route, for example to a default target or by inspecting the request.
- request
- IHttpRequest
The request to execute.
- responseHandler
- IResponseHandler
The response handler.
Returns
The response object generated by the response handler.
- Attributes
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
Execute(HttpHost, IHttpRequest, IHttpContext)
Executes a request to the target using the given context.
[Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.Apache.Http.IHttpResponse? Execute(Org.Apache.Http.HttpHost? target, Org.Apache.Http.IHttpRequest? request, Org.Apache.Http.Protocol.IHttpContext? context);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Execute : Org.Apache.Http.HttpHost * Org.Apache.Http.IHttpRequest * Org.Apache.Http.Protocol.IHttpContext -> Org.Apache.Http.IHttpResponse
Parameters
- target
- HttpHost
the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.
- request
- IHttpRequest
the request to execute
- context
- IHttpContext
the context to use for the execution, or
null to use the default context
Returns
The final response to the request. It is never an intermediate response with a 1xx status code. Whether redirects or authentication challenges are returned or handled automatically depends on the client implementation and configuration.
- Attributes
Exceptions
in case of a problem or the connection was aborted
in case of an http protocol error
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
Execute(HttpHost, IHttpRequest, IResponseHandler, IHttpContext)
Executes a request to the target using the given context and processes the response using the given response handler.
[Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/client/ResponseHandler;Lorg/apache/http/protocol/HttpContext;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_client_ResponseHandler_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? Execute(Org.Apache.Http.HttpHost? target, Org.Apache.Http.IHttpRequest? request, Org.Apache.Http.Client.IResponseHandler? responseHandler, Org.Apache.Http.Protocol.IHttpContext? context);
[<Android.Runtime.Register("execute", "(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/client/ResponseHandler;Lorg/apache/http/protocol/HttpContext;)Ljava/lang/Object;", "GetExecute_Lorg_apache_http_HttpHost_Lorg_apache_http_HttpRequest_Lorg_apache_http_client_ResponseHandler_Lorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpClientInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member Execute : Org.Apache.Http.HttpHost * Org.Apache.Http.IHttpRequest * Org.Apache.Http.Client.IResponseHandler * Org.Apache.Http.Protocol.IHttpContext -> Java.Lang.Object
Parameters
- target
- HttpHost
The target host for the request. Implementations may accept null when they can still determine a route, for example to a default target or by inspecting the request.
- request
- IHttpRequest
The request to execute.
- responseHandler
- IResponseHandler
The response handler.
- context
- IHttpContext
The context to use for the execution, or null to use the default context.
Returns
The response object generated by the response handler.
- Attributes
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.