Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Decompress helper functions to "String" type #455

Open
kunalmohan opened this issue Jan 3, 2025 · 0 comments
Open

Add Decompress helper functions to "String" type #455

kunalmohan opened this issue Jan 3, 2025 · 0 comments

Comments

@kunalmohan
Copy link

String type could have gzip helper functions such as "IsGzip" and "GzipDecompress()" functions for use as below:

he.GET("/data/abc.bin").
                WithHeader("Range", "bytes=0-2000").
		Expect().
		Status(http.StatusOK).
		HasContentType("application/octet-stream").
		Body().
		GzipDecompress().
                IsEqual(expectedData[:2000])

Or alternatively a generic decompress method that takes compression type as parameter:

he.GET("/data/abc.bin").
                WithHeader("Range", "bytes=0-2000").
		Expect().
		Status(http.StatusOK).
		HasContentType("application/octet-stream").
		Body().
		Decompress("gzip").
                IsEqual(expectedData[:2000])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant