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

Aldaviva / Unfucked / 39086174486

15 Oct 2026 06:11PM UTC coverage: 42.05% (-0.5%) from 42.526%
39086174486

push

github

Aldaviva
Added HTML parser integration in Unfucked.HTTP with AngleSharp, if it's installed (provided dependency). This changed the signature of the MessagBodyReader interface's Read method, affecting all external implementations. Add a convenience constructor to the console progress bar options struct. Renamed datablow block that aggregates all inputs into one output list from JoinAllBlock to CollectBlock, because join is often used in .NET to refer to a database join (what underscore refers to as zip).

710 of 2175 branches covered (32.64%)

22 of 75 new or added lines in 10 files covered. (29.33%)

130 existing lines in 6 files now uncovered.

1243 of 2956 relevant lines covered (42.05%)

160.59 hits per line

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

50.0
/HTTP/Serialization/ByteArrayBodyReader.cs
1
using System.Text;
2
using Unfucked.HTTP.Config;
3

4
namespace Unfucked.HTTP.Serialization;
5

6
public sealed class ByteArrayBodyReader: MessageBodyReader {
7

8
    public bool CanRead<T>(string? mimeType, string? bodyPrefix) => typeof(T) == typeof(byte[]);
1 ✔
9

10
    public async Task<T> Read<T>(HttpResponseMessage response, Encoding? responseEncoding, Configurable? clientConfig, CancellationToken cancellationToken) =>
NEW
11
        (T) (object) await ReadByteArray(response.Content, cancellationToken).ConfigureAwait(false);
×
12

13
    private static Task<byte[]> ReadByteArray(HttpContent responseBody, CancellationToken cancellationToken) =>
14
#if NET6_0_OR_GREATER
15
        responseBody.ReadAsByteArrayAsync(cancellationToken);
16
#else
17
        responseBody.ReadAsByteArrayAsync();
18
#endif
19

20
    public sealed class MemoryBodyReader: MessageBodyReader {
21

22
        public bool CanRead<T>(string? mimeType, string? bodyPrefix) => typeof(T) == typeof(Memory<byte>);
1 ✔
23

24
        public async Task<T> Read<T>(HttpResponseMessage response, Encoding? responseEncoding, Configurable? clientConfig, CancellationToken cancellationToken) =>
NEW
25
            (T) (object) (await ReadByteArray(response.Content, cancellationToken).ConfigureAwait(false)).AsMemory();
×
26

27
    }
28

29
    public sealed class ReadOnlyMemoryBodyReader: MessageBodyReader {
30

31
        public bool CanRead<T>(string? mimeType, string? bodyPrefix) => typeof(T) == typeof(ReadOnlyMemory<byte>);
1 ✔
32

33
        public async Task<T> Read<T>(HttpResponseMessage response, Encoding? responseEncoding, Configurable? clientConfig, CancellationToken cancellationToken) =>
NEW
34
            (T) (object) new ReadOnlyMemory<byte>(await ReadByteArray(response.Content, cancellationToken).ConfigureAwait(false));
×
35

36
    }
37

38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc