@hlw-uni-mp/request 1.0.13 → 1.0.14

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/dist/index.js CHANGED
@@ -6958,7 +6958,7 @@ function buildHeader(cred, customHeader) {
6958
6958
  const appid = "appid" in devInfo ? String(devInfo.appid || "") : "";
6959
6959
  const headers = { ...customHeader };
6960
6960
  if (cred.type === "local") {
6961
- if (appid) headers["X-Appid"] = String(appid);
6961
+ if (appid) headers["x-appid"] = String(appid);
6962
6962
  if (token) headers["token"] = String(token);
6963
6963
  }
6964
6964
  return headers;
@@ -7055,10 +7055,10 @@ function buildSecurityHeaders(config) {
7055
7055
  "Content-Type": "application/json",
7056
7056
  Accept: "application/json",
7057
7057
  ...config.headers,
7058
- "X-Client-Timestamp": String(timestamp),
7059
- "X-Client-Nonce": nonce,
7060
- "X-Client-Sign": sign,
7061
- "X-Client-Context": cipher
7058
+ "x-client-timestamp": String(timestamp),
7059
+ "x-client-nonce": nonce,
7060
+ "x-client-sign": sign,
7061
+ "x-client-context": cipher
7062
7062
  };
7063
7063
  if ("appid" in devInfo && devInfo.appid) {
7064
7064
  headers["x-appid"] = String(devInfo.appid);
package/dist/index.mjs CHANGED
@@ -6931,7 +6931,7 @@ function buildHeader(cred, customHeader) {
6931
6931
  const appid = "appid" in devInfo ? String(devInfo.appid || "") : "";
6932
6932
  const headers = { ...customHeader };
6933
6933
  if (cred.type === "local") {
6934
- if (appid) headers["X-Appid"] = String(appid);
6934
+ if (appid) headers["x-appid"] = String(appid);
6935
6935
  if (token) headers["token"] = String(token);
6936
6936
  }
6937
6937
  return headers;
@@ -7028,10 +7028,10 @@ function buildSecurityHeaders(config) {
7028
7028
  "Content-Type": "application/json",
7029
7029
  Accept: "application/json",
7030
7030
  ...config.headers,
7031
- "X-Client-Timestamp": String(timestamp),
7032
- "X-Client-Nonce": nonce,
7033
- "X-Client-Sign": sign,
7034
- "X-Client-Context": cipher
7031
+ "x-client-timestamp": String(timestamp),
7032
+ "x-client-nonce": nonce,
7033
+ "x-client-sign": sign,
7034
+ "x-client-context": cipher
7035
7035
  };
7036
7036
  if ("appid" in devInfo && devInfo.appid) {
7037
7037
  headers["x-appid"] = String(devInfo.appid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni-mp/request",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Universal Uni-App HTTP and upload client with RSA encryption & sign verification",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",