Function
defaultContentType
(encoding: Encoding["kind"])
Source from the content-addressed store, hash-verified
| 478 | }) as any |
| 479 | |
| 480 | const defaultContentType = (encoding: Encoding["kind"]) => { |
| 481 | switch (encoding) { |
| 482 | case "Json": { |
| 483 | return "application/json" |
| 484 | } |
| 485 | case "UrlParams": { |
| 486 | return "application/x-www-form-urlencoded" |
| 487 | } |
| 488 | case "Uint8Array": { |
| 489 | return "application/octet-stream" |
| 490 | } |
| 491 | case "Text": { |
| 492 | return "text/plain" |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * @since 1.0.0 |
Tested by
no test coverage detected