extra-request 11.0.0 → 11.0.1

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.
@@ -2,7 +2,7 @@ import { Headers } from 'extra-fetch';
2
2
  export function text(payload) {
3
3
  return (options) => {
4
4
  const headers = new Headers(options.headers);
5
- headers.set('Content-Type', 'application/x-www-form-urlencoded');
5
+ headers.set('Content-Type', 'text/plain');
6
6
  return {
7
7
  ...options,
8
8
  headers,
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/transformers/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGrC,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,OAAwB,EAAE,EAAE;QAClC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,mCAAmC,CAAC,CAAA;QAEhE,OAAO;YACL,GAAG,OAAO;YACV,OAAO;YACP,OAAO;SACR,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/transformers/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGrC,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,OAAwB,EAAE,EAAE;QAClC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA;QAEzC,OAAO;YACL,GAAG,OAAO;YACV,OAAO;YACP,OAAO;SACR,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-request",
3
- "version": "11.0.0",
3
+ "version": "11.0.1",
4
4
  "description": "Utilities for Request",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,7 +35,7 @@
35
35
  "prepare": "ts-patch install -s",
36
36
  "lint": "eslint --quiet src __tests__",
37
37
  "test": "vitest --run",
38
- "prepublishOnly": "run-s clean build",
38
+ "prepublishOnly": "run-s prepare clean build",
39
39
  "clean": "rimraf lib",
40
40
  "build": "tsc --project tsconfig.build.json",
41
41
  "release": "standard-version"
@@ -4,7 +4,7 @@ import { IRequestOptions, IRequestOptionsTransformer } from '@src/types.js'
4
4
  export function text(payload: string): IRequestOptionsTransformer {
5
5
  return (options: IRequestOptions) => {
6
6
  const headers = new Headers(options.headers)
7
- headers.set('Content-Type', 'application/x-www-form-urlencoded')
7
+ headers.set('Content-Type', 'text/plain')
8
8
 
9
9
  return {
10
10
  ...options