mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
This reverts commit a9a3b5e22b.
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ var defaults = {
|
||||
return data;
|
||||
}
|
||||
if (utils.isArrayBufferView(data)) {
|
||||
return data.slice().buffer;
|
||||
return data.buffer;
|
||||
}
|
||||
if (utils.isURLSearchParams(data)) {
|
||||
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
||||
|
||||
@@ -24,12 +24,6 @@ describe('defaults', function () {
|
||||
expect(defaults.transformRequest[0]('foo=bar')).toEqual('foo=bar');
|
||||
});
|
||||
|
||||
it('should transform TypedArrays without including buffer pool', function () {
|
||||
if (typeof Uint8Array === 'undefined') return this.skip();
|
||||
const buffered = new Uint8Array(256).subarray(10, 26);
|
||||
expect(defaults.transformRequest[0](buffered).byteLength).toEqual(16);
|
||||
});
|
||||
|
||||
it('should transform response json', function () {
|
||||
var data = defaults.transformResponse[0]('{"foo":"bar"}');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user