urllib 2.38.1 → 2.39.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/History.md CHANGED
@@ -1,4 +1,13 @@
1
1
 
2
+ 2.39.0 / 2022-10-09
3
+ ==================
4
+
5
+ **features**
6
+ * [[`2896cf0`](http://github.com/node-modules/urllib/commit/2896cf01234184bdefc23506ec6c5aaba81d30c2)] - 👌 IMPROVE: support lower case method on d.ts (#410) (fengmk2 <<fengmk2@gmail.com>>)
7
+
8
+ **others**
9
+ * [[`0a200be`](http://github.com/node-modules/urllib/commit/0a200bec22a4fd6895e864366e66c99a8559e5f8)] - chore: change npm tag to latest-2 (fengmk2 <<fengmk2@gmail.com>>)
10
+
2
11
  2.38.1 / 2022-07-05
3
12
  ==================
4
13
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # urllib
1
+ # urllib@2
2
2
 
3
3
  [![NPM version][npm-image]][npm-url]
4
4
  [![Node.js CI](https://github.com/node-modules/urllib/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/urllib/actions/workflows/nodejs.yml)
@@ -21,7 +21,7 @@ and digest authentication, redirections, cookies, timeout and more.
21
21
  ## Install
22
22
 
23
23
  ```bash
24
- $ npm install urllib --save
24
+ $ npm install urllib@2 --save
25
25
  ```
26
26
 
27
27
  ## Usage
package/lib/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export type HttpMethod = "GET" | "POST" | "DELETE" | "PUT" | "HEAD" | "OPTIONS"
12
12
  export as namespace urllib;
13
13
  export interface RequestOptions {
14
14
  /** Request method, defaults to GET. Could be GET, POST, DELETE or PUT. Alias 'type'. */
15
- method?: HttpMethod;
15
+ method?: HttpMethod | Lowercase<HttpMethod>;
16
16
  /** Alias method */
17
17
  type?: HttpMethod;
18
18
  /** Data to be sent. Will be stringify automatically. */
@@ -8,6 +8,9 @@ expectType<Buffer>((await curl<Buffer>('http://a.com', {})).data);
8
8
  expectType<string>((await curl<string>('http://a.com', {
9
9
  method: 'HEAD',
10
10
  })).data);
11
+ expectType<string>((await curl<string>('http://a.com', {
12
+ method: 'head',
13
+ })).data);
11
14
 
12
15
  // HttpClientResponse
13
16
  const res = await curl<Buffer>('http://a.com');
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "urllib",
3
- "version": "2.38.1",
3
+ "version": "2.39.0",
4
+ "publishConfig": {
5
+ "tag": "latest-2"
6
+ },
4
7
  "description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more.",
5
8
  "keywords": [
6
9
  "urllib",