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

Deflate compression for requests #4500

Open
pgj opened this issue Mar 28, 2023 · 0 comments
Open

Deflate compression for requests #4500

pgj opened this issue Mar 28, 2023 · 0 comments

Comments

@pgj
Copy link
Contributor

pgj commented Mar 28, 2023

CouchDB REST API does not seem to support requests with Deflate compression. On the contrary, this is the only method that HTTPie offers, which can make it difficult to use against the API when compression comes into question. For example, assuming that database test has been created on localhost and docs.json contains the uncompressed body of the request:

$ http --compress post http:https://adm:pass@localhost:15984/test/_bulk_docs @docs.json
HTTP/1.1 415 Unsupported Media Type
Cache-Control: must-revalidate
Content-Length: 85
Content-Type: application/json
Date: Tue, 28 Mar 2023 12:42:42 GMT
Server: CouchDB/3.3.1-467e14e (Erlang OTP/24)
X-Couch-Request-ID: 55b8b8f5ca
X-CouchDB-Body-Time: 57

{
    "error": "bad_content_type",
    "reason": "deflate is not a supported content encoding."
}

Add support for this content type to make http work in such scenarios.

@pgj pgj changed the title Deflate compression support for requests [Feature] Deflate compression support for requests Mar 28, 2023
@pgj pgj changed the title [Feature] Deflate compression support for requests [Feature] Deflate compression for requests Mar 28, 2023
@pgj pgj changed the title [Feature] Deflate compression for requests Deflate compression for requests Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant