* Fix handling for Streams
Fix `NullReferenceException` if raw content was handled as a string rather than a stream by `HttpClientAdapter.BuildResponse()`.
Resolves#2789.
* Add Connection.GetRaw tests
Add tests for `Connection.GetRaw()` and for #2789.
---------
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* Add some tests to be completed
* Actually fail the tests
* Create AbuseException class
Copied from ForbiddenException and then gone over to inherit from it.
* Actually add AbuseException to csproj
* Update test file
* Ran .\build FixProjects
* Test updates
* Default message update for AbuseException
* Separate the exception creation logic
* Remove message assertion -- doesn't matter here
* Additional test for abuse message
* Remove unnecessary variable assignment
* Failing test for unsafe request
* Attempt to fix test
Still broken -- I don't think empty strings count to trigger the default
message
* Remove test that will always fail due to another issue
Opened #1529 to explore this.
* New tests (some failing)
* Passing tests are, like, better than failing tests.
* Last passing test
* Cleanup
* Add test for zero value and fix code
Lol boundary cases.
* cleanup
* Mark ParseRetryAfterSeconds as static
* Add GetObjectData override to AbuseException
To include data for RetryAfterSeconds variable, and satisfy the build
check.
* Add back failing test & skip it
* Change to nullable int with null default
* Fix tests around nullable default
* whitespace fixes
* Compact the logic; tests still pass
* Invert the if statements for compactness / clarity
* Test subclasses & reformatting
* Test name changes
* Whitespace fix
* Remove redundant line
This keeps the IHttpClient interface simpler and ensures the
deserialization responsibility lies outside of that class. It only
needed the Type parameter for a special case that could be handled in a
better way.
Rather than create a default user agent, we'll build the user agent for
the user of the library. We only require that the user provide us
product information.
fixes#61