IHttpClient.Execute 方法

定义

重载

名称 说明
Execute(IHttpUriRequest)

使用给定上下文向目标执行请求。

Execute(IHttpUriRequest, IResponseHandler)

使用默认上下文执行请求,并使用给定的响应处理程序处理响应。

Execute(IHttpUriRequest, IHttpContext)

使用给定上下文执行请求。

Execute(HttpHost, IHttpRequest)

使用默认上下文对目标执行请求。

Execute(IHttpUriRequest, IResponseHandler, IHttpContext)

使用给定上下文执行请求,并使用给定的响应处理程序处理响应。

Execute(HttpHost, IHttpRequest, IResponseHandler)

使用默认上下文对目标执行请求,并使用给定的响应处理程序处理响应。

Execute(HttpHost, IHttpRequest, IHttpContext)

使用给定上下文向目标执行请求。

Execute(HttpHost, IHttpRequest, IResponseHandler, IHttpContext)

使用给定上下文向目标执行请求,并使用给定的响应处理程序处理响应。

Execute(IHttpUriRequest)

使用给定上下文向目标执行请求。

[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

参数

request
IHttpUriRequest

要执行的请求

返回

对请求的最终响应。 它绝不是具有 1xx 状态代码的中间响应。 是返回还是自动处理重定向或身份验证质询取决于客户端实现和配置。

属性

例外

如果出现问题或连接已中止

如果出现 http 协议错误

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(IHttpUriRequest, IResponseHandler)

使用默认上下文执行请求,并使用给定的响应处理程序处理响应。

[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

参数

request
IHttpUriRequest

要执行的请求。

responseHandler
IResponseHandler

响应处理程序。

返回

响应处理程序生成的响应对象。

属性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(IHttpUriRequest, IHttpContext)

使用给定上下文执行请求。

[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

参数

request
IHttpUriRequest

要执行的请求

context
IHttpContext

要用于执行的上下文,或使用 null 默认上下文

返回

对请求的最终响应。 它绝不是具有 1xx 状态代码的中间响应。 是返回还是自动处理重定向或身份验证质询取决于客户端实现和配置。

属性

例外

如果出现问题或连接已中止

如果出现 http 协议错误

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(HttpHost, IHttpRequest)

使用默认上下文对目标执行请求。

[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

参数

target
HttpHost

请求的目标主机。 如果实现仍可以确定路由(例如到默认目标或通过检查请求),则它们可能会接受 null

request
IHttpRequest

要执行的请求

返回

对请求的最终响应。 它绝不是具有 1xx 状态代码的中间响应。 是返回还是自动处理重定向或身份验证质询取决于客户端实现和配置。

属性

例外

如果出现问题或连接已中止

如果出现 http 协议错误

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(IHttpUriRequest, IResponseHandler, IHttpContext)

使用给定上下文执行请求,并使用给定的响应处理程序处理响应。

[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

参数

request
IHttpUriRequest

要执行的请求。

responseHandler
IResponseHandler

响应处理程序。

context
IHttpContext

要用于执行的上下文,或使用 null 默认上下文。

返回

响应处理程序生成的响应对象。

属性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(HttpHost, IHttpRequest, IResponseHandler)

使用默认上下文对目标执行请求,并使用给定的响应处理程序处理响应。

[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

参数

target
HttpHost

请求的目标主机。 当实现仍可以确定路由(例如,到默认目标或通过检查请求)时,它们可能会接受 null

request
IHttpRequest

要执行的请求。

responseHandler
IResponseHandler

响应处理程序。

返回

响应处理程序生成的响应对象。

属性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(HttpHost, IHttpRequest, IHttpContext)

使用给定上下文向目标执行请求。

[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

参数

target
HttpHost

请求的目标主机。 如果实现仍可以确定路由(例如到默认目标或通过检查请求),则它们可能会接受 null

request
IHttpRequest

要执行的请求

context
IHttpContext

要用于执行的上下文,或使用 null 默认上下文

返回

对请求的最终响应。 它绝不是具有 1xx 状态代码的中间响应。 是返回还是自动处理重定向或身份验证质询取决于客户端实现和配置。

属性

例外

如果出现问题或连接已中止

如果出现 http 协议错误

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Execute(HttpHost, IHttpRequest, IResponseHandler, IHttpContext)

使用给定上下文向目标执行请求,并使用给定的响应处理程序处理响应。

[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

参数

target
HttpHost

请求的目标主机。 当实现仍可以确定路由(例如,到默认目标或通过检查请求)时,它们可能会接受 null

request
IHttpRequest

要执行的请求。

responseHandler
IResponseHandler

响应处理程序。

context
IHttpContext

要用于执行的上下文,或使用 null 默认上下文。

返回

响应处理程序生成的响应对象。

属性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于