forked from Pathoschild/FluentHttpClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestOptions.cs
More file actions
27 lines (24 loc) · 1.03 KB
/
RequestOptions.cs
File metadata and controls
27 lines (24 loc) · 1.03 KB
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
namespace Pathoschild.Http.Client
{
/// <summary>Options for a request.</summary>
public class RequestOptions
{
/*********
** Accessors
*********/
/// <summary>Whether to ignore null arguments when the request is dispatched. Default true if not specified.</summary>
public bool? IgnoreNullArguments { get; set; }
/// <summary>Whether HTTP error responses (e.g. HTTP 404) should be ignored (else raised as exceptions). Default false if not specified.</summary>
public bool? IgnoreHttpErrors { get; set; }
/*********
** Public methods
*********/
/// <summary>Copy the non-null values from the given options.</summary>
/// <param name="options">The options to copy.</param>
internal void MergeFrom(RequestOptions? options)
{
this.IgnoreNullArguments = options?.IgnoreNullArguments ?? this.IgnoreNullArguments;
this.IgnoreHttpErrors = options?.IgnoreHttpErrors ?? this.IgnoreHttpErrors;
}
}
}