@sygna/bridge-util 2.0.1 → 2.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api/index.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sygna/bridge-util",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "JavaScript library to interact with Sygna Bridge Server.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/api/index.js CHANGED
@@ -101,6 +101,7 @@ class API {
101
101
  const headers = {
102
102
  'Content-Type': 'application/json',
103
103
  'x-api-key': this.api_key,
104
+ 'User-Agent': 'util-js/2.0.2"'
104
105
  };
105
106
  const response = await fetch(url, {
106
107
  method: 'POST',
@@ -115,7 +116,7 @@ class API {
115
116
  * @param {string} url
116
117
  */
117
118
  async getSB(url) {
118
- const headers = { 'x-api-key': this.api_key };
119
+ const headers = { 'x-api-key': this.api_key, 'User-Agent': 'util-js/2.0.2"' };
119
120
  const response = await fetch(url, { headers: headers });
120
121
  return await response.json();
121
122
  }