@marianmeres/http-utils 1.7.0 → 1.8.0

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.cjs CHANGED
@@ -3,6 +3,8 @@
3
3
  var merge = require('dset/merge');
4
4
 
5
5
  class HTTP_STATUS {
6
+ // special case shortcut
7
+ static OK = 200;
6
8
  // 1xx
7
9
  // prettier-ignore
8
10
  static INFO = {
@@ -15,8 +17,9 @@ class HTTP_STATUS {
15
17
  // prettier-ignore
16
18
  static SUCCESS = {
17
19
  OK: { CODE: 200, TEXT: 'OK' },
18
- NON_AUTHORITATIVE_INFO: { CODE: 203, TEXT: 'Non-Authoritative Information' },
20
+ CREATED: { CODE: 201, TEXT: 'Created' },
19
21
  ACCEPTED: { CODE: 202, TEXT: 'Accepted' },
22
+ NON_AUTHORITATIVE_INFO: { CODE: 203, TEXT: 'Non-Authoritative Information' },
20
23
  NO_CONTENT: { CODE: 204, TEXT: 'No Content' },
21
24
  RESET_CONTENT: { CODE: 205, TEXT: 'Reset Content' },
22
25
  PARTIAL_CONTENT: { CODE: 206, TEXT: 'Partial Content' },
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { dset } from 'dset/merge';
2
2
 
3
3
  class HTTP_STATUS {
4
+ // special case shortcut
5
+ static OK = 200;
4
6
  // 1xx
5
7
  // prettier-ignore
6
8
  static INFO = {
@@ -13,8 +15,9 @@ class HTTP_STATUS {
13
15
  // prettier-ignore
14
16
  static SUCCESS = {
15
17
  OK: { CODE: 200, TEXT: 'OK' },
16
- NON_AUTHORITATIVE_INFO: { CODE: 203, TEXT: 'Non-Authoritative Information' },
18
+ CREATED: { CODE: 201, TEXT: 'Created' },
17
19
  ACCEPTED: { CODE: 202, TEXT: 'Accepted' },
20
+ NON_AUTHORITATIVE_INFO: { CODE: 203, TEXT: 'Non-Authoritative Information' },
18
21
  NO_CONTENT: { CODE: 204, TEXT: 'No Content' },
19
22
  RESET_CONTENT: { CODE: 205, TEXT: 'Reset Content' },
20
23
  PARTIAL_CONTENT: { CODE: 206, TEXT: 'Partial Content' },
package/dist/status.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare class HTTP_STATUS {
2
+ static readonly OK = 200;
2
3
  static readonly INFO: {
3
4
  CONTINUE: {
4
5
  CODE: number;
@@ -22,7 +23,7 @@ export declare class HTTP_STATUS {
22
23
  CODE: number;
23
24
  TEXT: string;
24
25
  };
25
- NON_AUTHORITATIVE_INFO: {
26
+ CREATED: {
26
27
  CODE: number;
27
28
  TEXT: string;
28
29
  };
@@ -30,6 +31,10 @@ export declare class HTTP_STATUS {
30
31
  CODE: number;
31
32
  TEXT: string;
32
33
  };
34
+ NON_AUTHORITATIVE_INFO: {
35
+ CODE: number;
36
+ TEXT: string;
37
+ };
33
38
  NO_CONTENT: {
34
39
  CODE: number;
35
40
  TEXT: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/http-utils",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Misc DRY http fetch related helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",