basdijkstra / rest-assured-net

C# DSL for writing readable tests for HTTP-based APIs
Apache License 2.0
134 stars 16 forks source link

Feature: Response size #92

Closed christiaanwvermaak closed 11 months ago

christiaanwvermaak commented 1 year ago

Please provide a mechanism to retrieve the size of the response. This can be split between the response headers and response body. It will enable quick test to see if the response is the same when comparing the sizes of the response bodies.

basdijkstra commented 1 year ago

Hey @christiaanwvermaak, as discussed, these features are added in https://github.com/basdijkstra/rest-assured-net/commit/096bb6f1cdecf541dc44f48d70105ad2353e3fdd.

https://github.com/basdijkstra/rest-assured-net/blob/main/RestAssured.Net.Tests/ResponseBodyLengthVerificationTests.cs contains examples on:

Please note that the response body length verification is based on the actual response body, not on the value of the Content-Length header.

Please test this using version 3.0.0-beta.3 and close this issue when you think it has been properly addressed.

basdijkstra commented 11 months ago

Closing this as discussed with @christiaanwvermaak.