@d1g1tal/transportr 2.1.1 → 2.1.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/README.md +18 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -330,11 +330,6 @@ api
330
330
 
331
331
  | Property | Description |
332
332
  |----------|-------------|
333
- | `Transportr.MediaType` | HTTP media type constants |
334
- | `Transportr.RequestMethod` | HTTP method constants |
335
- | `Transportr.RequestHeader` | Request header constants |
336
- | `Transportr.ResponseHeader` | Response header constants |
337
- | `Transportr.CachingPolicy` | Cache policy constants |
338
333
  | `Transportr.CredentialsPolicy` | Credentials policy constants |
339
334
  | `Transportr.RequestModes` | Request mode constants |
340
335
  | `Transportr.RequestPriorities` | Request priority constants |
@@ -342,6 +337,24 @@ api
342
337
  | `Transportr.ReferrerPolicy` | Referrer policy constants |
343
338
  | `Transportr.RequestEvents` | Event name constants |
344
339
 
340
+ ### Submodule Imports
341
+
342
+ HTTP constant objects are available as named submodule imports rather than static class properties:
343
+
344
+ ```typescript
345
+ import { HttpMediaType } from '@d1g1tal/transportr/media-types';
346
+ import { HttpRequestMethod } from '@d1g1tal/transportr/methods';
347
+ import { HttpRequestHeader } from '@d1g1tal/transportr/headers';
348
+ import { HttpResponseHeader } from '@d1g1tal/transportr/response-headers';
349
+ ```
350
+
351
+ | Submodule | Export | Description |
352
+ |-----------|--------|-------------|
353
+ | `@d1g1tal/transportr/media-types` | `HttpMediaType` | MIME type string constants |
354
+ | `@d1g1tal/transportr/methods` | `HttpRequestMethod` | HTTP method string constants |
355
+ | `@d1g1tal/transportr/headers` | `HttpRequestHeader` | Request header name constants |
356
+ | `@d1g1tal/transportr/response-headers` | `HttpResponseHeader` | Response header name constants |
357
+
345
358
  ## License
346
359
 
347
360
  [ISC](LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d1g1tal/transportr",
3
3
  "author": "D1g1talEntr0py",
4
- "version": "2.1.1",
4
+ "version": "2.1.2",
5
5
  "license": "ISC",
6
6
  "description": "JavaScript wrapper for the Fetch API and more...",
7
7
  "homepage": "https://github.com/D1g1talEntr0py/transportr#readme",