AndroidHttpClient.NewInstance 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
NewInstance(String) |
Create a new HttpClient with reasonable defaults (which you can update). |
NewInstance(String, Context) |
Create a new HttpClient with reasonable defaults (which you can update). |
NewInstance(String)
Create a new HttpClient with reasonable defaults (which you can update).
[Android.Runtime.Register("newInstance", "(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;", "")]
public static Android.Net.Http.AndroidHttpClient? NewInstance (string? userAgent);
[<Android.Runtime.Register("newInstance", "(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;", "")>]
static member NewInstance : string -> Android.Net.Http.AndroidHttpClient
Parameters
- userAgent
- String
to report in your HTTP requests.
Returns
- 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
NewInstance(String, Context)
Create a new HttpClient with reasonable defaults (which you can update).
[Android.Runtime.Register("newInstance", "(Ljava/lang/String;Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;", "")]
public static Android.Net.Http.AndroidHttpClient? NewInstance (string? userAgent, Android.Content.Context? context);
[<Android.Runtime.Register("newInstance", "(Ljava/lang/String;Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;", "")>]
static member NewInstance : string * Android.Content.Context -> Android.Net.Http.AndroidHttpClient
Parameters
- userAgent
- String
to report in your HTTP requests
- context
- Context
to use for caching SSL sessions (may be null for no caching)
Returns
- 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.