packages http remove ejson dependency completely

This commit is contained in:
Jan Küster
2021-05-30 20:19:54 +02:00
parent 4f7fcf20c9
commit 8fd345c1c4
3 changed files with 2 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
import { EJSON } from 'meteor/ejson';
import { path } from 'path';
import { fetch, Request } from 'meteor/fetch';
import { URL } from 'meteor/url';
@@ -39,7 +38,7 @@ function _call (method, url, options, callback) {
let content = options.content;
if (options.data) {
content = EJSON.stringify(options.data);
content = JSON.stringify(options.data);
headers['Content-Type'] = 'application/json';
}

View File

@@ -1,4 +1,3 @@
import { EJSON } from 'meteor/ejson';
import { HTTP } from 'meteor/http';
// URL prefix for tests to talk to
@@ -421,7 +420,7 @@ testAsyncMulti('httpcall - params', [
const data = result.data;
test.equal(data.method, method);
test.equal(data.url, expect_url);
test.equal(data.body, expect_body, `${method} ${url} ${EJSON.stringify(params)} - expect body`);
test.equal(data.body, expect_body, `${method} ${url} ${JSON.stringify(params)} - expect body`);
}
}))
}

View File

@@ -24,7 +24,6 @@ Package.onTest(function (api) {
api.use('webapp', 'server');
api.use('underscore');
api.use('random');
api.use('ejson');
api.use('http', ['client', 'server']);
api.use('tinytest');
api.use('test-helpers', ['client', 'server']);