BasicHttpProcessor.AddInterceptor 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| AddInterceptor(IHttpRequestInterceptor) | |
| AddInterceptor(IHttpResponseInterceptor) | |
| AddInterceptor(IHttpRequestInterceptor, Int32) |
在请求拦截器列表中提供的位置插入请求侦听器。 |
| AddInterceptor(IHttpResponseInterceptor, Int32) |
在响应拦截器列表中提供的位置插入响应侦听器。 |
AddInterceptor(IHttpRequestInterceptor)
[Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpRequestInterceptor;)V", "")]
public void AddInterceptor(Org.Apache.Http.IHttpRequestInterceptor? interceptor);
[<Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpRequestInterceptor;)V", "")>]
member this.AddInterceptor : Org.Apache.Http.IHttpRequestInterceptor -> unit
参数
- interceptor
- IHttpRequestInterceptor
要添加的侦听器
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
AddInterceptor(IHttpResponseInterceptor)
[Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpResponseInterceptor;)V", "")]
public void AddInterceptor(Org.Apache.Http.IHttpResponseInterceptor? interceptor);
[<Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpResponseInterceptor;)V", "")>]
member this.AddInterceptor : Org.Apache.Http.IHttpResponseInterceptor -> unit
参数
- interceptor
- IHttpResponseInterceptor
要添加的侦听器
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
AddInterceptor(IHttpRequestInterceptor, Int32)
在请求拦截器列表中提供的位置插入请求侦听器。
[Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpRequestInterceptor;I)V", "")]
public void AddInterceptor(Org.Apache.Http.IHttpRequestInterceptor? interceptor, int index);
[<Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpRequestInterceptor;I)V", "")>]
member this.AddInterceptor : Org.Apache.Http.IHttpRequestInterceptor * int -> unit
参数
- interceptor
- IHttpRequestInterceptor
要插入的请求侦听器。
null检查索引是否为负值后,将忽略侦听器。
- index
- Int32
从零开始的插入索引。 对于非 null 侦听器,这必须介于零和请求侦听器计数(含)之间。
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
AddInterceptor(IHttpResponseInterceptor, Int32)
在响应拦截器列表中提供的位置插入响应侦听器。
[Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpResponseInterceptor;I)V", "")]
public void AddInterceptor(Org.Apache.Http.IHttpResponseInterceptor? interceptor, int index);
[<Android.Runtime.Register("addInterceptor", "(Lorg/apache/http/HttpResponseInterceptor;I)V", "")>]
member this.AddInterceptor : Org.Apache.Http.IHttpResponseInterceptor * int -> unit
参数
- interceptor
- IHttpResponseInterceptor
要插入的响应侦听器。
null检查索引是否为负值后,将忽略侦听器。
- index
- Int32
从零开始的插入索引。 对于非 null 侦听器,这必须在零和响应拦截器计数(含)之间。
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。