gavv / gavv/httpexpect

Add Decompress helper functions to "String" type

Open
#455 2 comments 0 reactions 0 assignees View on GitHub
feature good first issue help wanted
Dominant language
Go
Stars
2.7k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

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])
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.