forked from Pathoschild/FluentHttpClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFluentClientOptions.cs
More file actions
29 lines (26 loc) · 923 Bytes
/
FluentClientOptions.cs
File metadata and controls
29 lines (26 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace Pathoschild.Http.Client
{
/// <summary>Options for the fluent client.</summary>
public class FluentClientOptions
{
/*********
** Accessors
*********/
/// <summary>Whether to ignore null arguments when the request is dispatched.</summary>
public bool? IgnoreNullArguments { get; set; }
/// <summary>Whether HTTP error responses (e.g. HTTP 404) should be ignored (else raised as exceptions).</summary>
public bool? IgnoreHttpErrors { get; set; }
/*********
** Public methods
*********/
/// <summary>Get the equivalent request options.</summary>
internal RequestOptions ToRequestOptions()
{
return new RequestOptions
{
IgnoreHttpErrors = this.IgnoreHttpErrors,
IgnoreNullArguments = this.IgnoreNullArguments
};
}
}
}