@zwa73/utils 1.0.197 → 1.0.198

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/UtilCom.d.ts CHANGED
@@ -96,6 +96,12 @@ export declare class UtilCom<D extends Partial<ComRequestOption>, S extends Send
96
96
  }, S, A>;
97
97
  /**补充参数 */
98
98
  option<OPT extends Partial<ComRequestOption>>(opt: OPT): UtilCom<D & OPT, S, A>;
99
+ /**收发皆为json的post预设 */
100
+ postJson(): UtilCom<D & {
101
+ readonly method: "POST";
102
+ }, SendProc<[JsonType<D & {
103
+ readonly method: "POST";
104
+ }>]>, AcceptProc<string, JToken>>;
99
105
  /**收发皆为json的预设 */
100
106
  json(): UtilCom<D, SendProc<[JsonType<D>]>, AcceptProc<string, JToken>>;
101
107
  /**接收数据类型*/
package/dist/UtilCom.js CHANGED
@@ -53,6 +53,10 @@ class UtilCom {
53
53
  }
54
54
  //#endregion
55
55
  //#region 快速预设
56
+ /**收发皆为json的post预设 */
57
+ postJson() {
58
+ return this.post().json();
59
+ }
56
60
  /**收发皆为json的预设 */
57
61
  json() {
58
62
  return this.sendJson().acceptJson();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/utils",
3
- "version": "1.0.197",
3
+ "version": "1.0.198",
4
4
  "description": "my utils",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/UtilCom.ts CHANGED
@@ -124,6 +124,10 @@ A extends AcceptProc<any,any>,
124
124
  //#endregion
125
125
 
126
126
  //#region 快速预设
127
+ /**收发皆为json的post预设 */
128
+ postJson(){
129
+ return this.post().json();
130
+ }
127
131
  /**收发皆为json的预设 */
128
132
  json(){
129
133
  return this.sendJson().acceptJson();