@tryghost/http-stream 0.1.23 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,14 +13,15 @@ class HttpStream {
13
13
  throw new GhostError.IncorrectUsageError({message: 'Type Error: Http transport requires log data to be an object'});
14
14
  }
15
15
 
16
- let body = {
16
+ const options = {
17
17
  ...this.config,
18
18
  method: 'POST',
19
- headers: {'Content-Type': 'application/json'},
20
- body: JSON.stringify(data)
19
+ json: data
21
20
  };
21
+ const {url} = options;
22
+ delete options.url;
22
23
 
23
- return await request(this.config.url, body);
24
+ return await request(url, options);
24
25
  } catch (error) {
25
26
  debug('Failed to ship log', error.message);
26
27
  return false;
@@ -28,4 +29,4 @@ class HttpStream {
28
29
  }
29
30
  }
30
31
 
31
- module.exports = HttpStream;
32
+ module.exports = HttpStream;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/http-stream",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/http-stream",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@tryghost/errors": "^1.2.26",
32
- "@tryghost/request": "^0.1.41"
32
+ "@tryghost/request": "^1.0.0"
33
33
  },
34
- "gitHead": "2330ad6fb69583198fb7ffd1b06fce6e4fcbe4d6"
34
+ "gitHead": "d38ba029063f79f069aca22719099d8e365e9c03"
35
35
  }