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

Aldaviva / Unfucked / 19128584806

06 Nov 2025 07:47AM UTC coverage: 0.396% (-39.5%) from 39.923%
19128584806

push

github

Aldaviva
DateTime: added IsBefore and IsAfter for ZonedDateTime, not just OffsetDateTime. DI: Allow super registration for keyed services; fixed super registration of a hosted service causing an infinite recursion during injection. STUN: updated fallback server list, most of which have gone offline (including Google, confusingly); made HttpClient optional.

2 of 1605 branches covered (0.12%)

0 of 55 new or added lines in 2 files covered. (0.0%)

945 existing lines in 35 files now uncovered.

9 of 2272 relevant lines covered (0.4%)

0.04 hits per line

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

0.0
/HTTP/UnfuckedWebTarget.Requests.cs
1
namespace Unfucked.HTTP;
2

3
public partial class WebTarget {
4

UNCOV
5
    private static readonly HttpMethod PATCH_VERB   = new("PATCH");
×
UNCOV
6
    private static readonly Type       STREAM_CLASS = typeof(Stream);
×
7

8
    /*
9
     * Must not be async so the AsyncLocal scope for wire logging is high enough in the async chain.
10
     */
11
    /// <inheritdoc />
12
    public virtual Task<HttpResponseMessage> Send(HttpMethod verb, HttpContent? requestBody = null, CancellationToken cancellationToken = default) =>
UNCOV
13
        client.SendAsync(new HttpRequest(verb, urlBuilder.ToUrl(), Headers, requestBody, clientConfig), cancellationToken);
×
14

15
    /// <inheritdoc />
UNCOV
16
    public Task<HttpResponseMessage> Get(CancellationToken cancellationToken = default) => Send(HttpMethod.Get, null, cancellationToken);
×
17

18
    /// <inheritdoc />
19
    public Task<HttpResponseMessage> Head(CancellationToken cancellationToken = default) => Send(HttpMethod.Head, null, cancellationToken);
×
20

21
    /// <inheritdoc />
22
    public Task<HttpResponseMessage> Post(HttpContent? requestBody, CancellationToken cancellationToken = default) => Send(HttpMethod.Post, requestBody, cancellationToken);
×
23

24
    /// <inheritdoc />
25
    public Task<HttpResponseMessage> Put(HttpContent? requestBody, CancellationToken cancellationToken = default) => Send(HttpMethod.Put, requestBody, cancellationToken);
×
26

27
    /// <inheritdoc />
28
    public Task<HttpResponseMessage> Patch(HttpContent? requestBody, CancellationToken cancellationToken = default) => Send(PATCH_VERB, requestBody, cancellationToken);
×
29

30
    /// <inheritdoc />
31
    public Task<HttpResponseMessage> Delete(HttpContent? requestBody = null, CancellationToken cancellationToken = default) => Send(HttpMethod.Delete, requestBody, cancellationToken);
×
32

33
    /// <inheritdoc />
34
    public async Task<T> Send<T>(HttpMethod verb, HttpContent? requestBody, CancellationToken cancellationToken = default) {
35
        HttpResponseMessage response = await Send(verb, requestBody, cancellationToken).ConfigureAwait(false);
×
36
        try {
37
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
38
        } finally {
39
            DisposeIfNotStream<T>(response);
×
40
        }
41
    }
×
42

43
    /// <inheritdoc />
44
    public async Task<T> Get<T>(CancellationToken cancellationToken = default) {
UNCOV
45
        HttpResponseMessage response = await Get(cancellationToken).ConfigureAwait(false);
×
46
        try {
UNCOV
47
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
48
        } finally {
UNCOV
49
            DisposeIfNotStream<T>(response);
×
50
        }
UNCOV
51
    }
×
52

53
    /// <inheritdoc />
54
    public async Task<T> Post<T>(HttpContent? requestBody, CancellationToken cancellationToken = default) {
55
        HttpResponseMessage response = await Post(requestBody, cancellationToken).ConfigureAwait(false);
×
56
        try {
57
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
58
        } finally {
59
            DisposeIfNotStream<T>(response);
×
60
        }
61
    }
×
62

63
    /// <inheritdoc />
64
    public async Task<T> Put<T>(HttpContent? requestBody, CancellationToken cancellationToken = default) {
65
        HttpResponseMessage response = await Put(requestBody, cancellationToken).ConfigureAwait(false);
×
66
        try {
67
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
68
        } finally {
69
            DisposeIfNotStream<T>(response);
×
70
        }
71
    }
×
72

73
    /// <inheritdoc />
74
    public async Task<T> Patch<T>(HttpContent? requestBody, CancellationToken cancellationToken = default) {
75
        HttpResponseMessage response = await Patch(requestBody, cancellationToken).ConfigureAwait(false);
×
76
        try {
77
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
78
        } finally {
79
            DisposeIfNotStream<T>(response);
×
80
        }
81
    }
×
82

83
    /// <inheritdoc />
84
    public async Task<T> Delete<T>(HttpContent? requestBody = null, CancellationToken cancellationToken = default) {
85
        HttpResponseMessage response = await Delete(requestBody, cancellationToken).ConfigureAwait(false);
×
86
        try {
87
            return await ParseResponseBody<T>(response, cancellationToken).ConfigureAwait(false);
×
88
        } finally {
89
            DisposeIfNotStream<T>(response);
×
90
        }
91
    }
×
92

93
    private static void DisposeIfNotStream<T>(HttpResponseMessage response) {
UNCOV
94
        if (typeof(T) != STREAM_CLASS) {
×
UNCOV
95
            response.Dispose();
×
96
        }
UNCOV
97
    }
×
98

99
}
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

© 2026 Coveralls, Inc