Class AutoCompress
public
Extends:
Handler
Since:
v5.5.0
A request handler that automatically compresses the request body if the request body is a string, array buffer, blob, or form data.
This uses the CompressionStream API
The compression format as well as the kinds of data to compress can be
configured using the format
and constraints
options.
+import { AutoCompress } from '@ember-data/request-utils/handlers';
import Fetch from '@ember-data/request/fetch';
import RequestManager from '@ember-data/request';
import Store from '@ember-data/store';
class AppStore extends Store {
requestManager = new RequestManager()
.use([
+ new AutoCompress(),
Fetch
]);
}