homebridge-melcloud-control 4.0.0-beta.370 → 4.0.0-beta.371

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.0.0-beta.370",
4
+ "version": "4.0.0-beta.371",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -96,15 +96,14 @@ class MelCloudHomeToken extends EventEmitter {
96
96
  code_verifier: codeVerifier,
97
97
  });
98
98
 
99
- const tokenResponse = await this.axiosInstance({
99
+ const tokenResponse = await this.axiosInstance(tokenData.toString(), {
100
100
  method: 'POST',
101
101
  baseURL: TOKEN_ENDPOINT,
102
102
  headers: {
103
103
  'Content-Type': 'application/x-www-form-urlencoded',
104
- 'Content-Length': tokenData.toString().length,
104
+
105
105
  'Authorization': 'Basic aG9tZW1vYmlsZTo=',
106
106
  },
107
- data: tokenData.toString()
108
107
  });
109
108
 
110
109
  const tokens = tokenResponse.data;
@@ -146,7 +145,7 @@ class MelCloudHomeToken extends EventEmitter {
146
145
  if (this.logWarn) this.emit('warn', `Redirect URL: ${url}`);
147
146
 
148
147
  // Step 3: Wyślij POST z danymi logowania
149
- const response = await this.axiosInstance({
148
+ const response = await this.axiosInstance(formData.toString(), {
150
149
  method: 'POST',
151
150
  baseURL: url,
152
151
  headers: {
@@ -159,7 +158,6 @@ class MelCloudHomeToken extends EventEmitter {
159
158
  'Origin': 'https://live-melcloudhome.auth.eu-west-1.amazoncognito.com',
160
159
  'Referer': url,
161
160
  },
162
- data: formData.toString(),
163
161
  maxRedirects: 0,
164
162
  validateStatus: status => [200, 302, 400].includes(status),
165
163
  });