• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / FluentRest / 11929962690

20 Nov 2024 08:57AM UTC coverage: 58.107%. Remained the same
11929962690

Pull #206

github

web-flow
Merge 7d96b20ca into dd4bfca3f
Pull Request #206: Bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0

264 of 594 branches covered (44.44%)

Branch coverage included in aggregate %.

829 of 1287 relevant lines covered (64.41%)

48.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/FluentRest/FluentClient.cs
1
// Ignore Spelling: Serializer
2

3
namespace FluentRest;
4

5
/// <summary>
6
/// Provides a fluent class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
7
/// </summary>
8
public class FluentClient : IFluentClient
9
{
10
    /// <summary>
11
    /// Initializes a new instance of the <see cref="FluentClient" /> class.
12
    /// </summary>
13
    /// <param name="httpClient">The HTTP client.</param>
14
    public FluentClient(HttpClient httpClient) : this(httpClient, null)
×
15
    {
16
    }
×
17

18
    /// <summary>
19
    /// Initializes a new instance of the <see cref="FluentClient" /> class.
20
    /// </summary>
21
    /// <param name="httpClient">The HTTP client.</param>
22
    /// <param name="contentSerializer">The content serializer.</param>
23
    public FluentClient(HttpClient httpClient, IContentSerializer contentSerializer)
78✔
24
    {
25
        HttpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
78!
26
        ContentSerializer = contentSerializer ?? FluentRest.ContentSerializer.Current;
78!
27
    }
78✔
28

29

30
    /// <summary>
31
    /// Gets or sets the serializer used to convert to and from <see cref="HttpContent"/>.
32
    /// </summary>
33
    /// <value>
34
    /// The serializer used to convert to and from <see cref="HttpContent"/>.
35
    /// </value>
36
    public IContentSerializer ContentSerializer { get; set; }
158✔
37

38
    /// <summary>
39
    /// Gets the <see cref="HttpClient" /> used to send request.
40
    /// </summary>
41
    /// <value>
42
    /// The <see cref="HttpClient" /> used to send request.
43
    /// </value>
44
    public HttpClient HttpClient { get; }
76✔
45

46
    /// <inheritdoc/>
47
    public void Dispose()
48
    {
49
        HttpClient?.Dispose();
×
50
    }
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc