1.0.0 • Published 5 years ago

@alicloud/http-core-sdk v1.0.0

Weekly downloads
372
License
MIT
Repository
github
Last release
5 years ago

Node.js Core SDK

Core SDK 用于处理底层的 HTTP/HTTPS 协议的请求和接受。

设计理念:

  1. coresdk 提供两个方法:$send()/$read()
  2. $send() 方法接受一个 request 参数。该参数包含 URI 描述、Headers、Method、Body。

URL 规范

┌─────────────────────────────────────────────────────────────────────────────┐
│                                    href                                     │
├──────────┬┬───────────┬─────────────────┬───────────────────────────┬───────┤
│ protocol ││   auth    │      host       │           path            │ hash  │
│          ││           ├──────────┬──────┼──────────┬────────────────┤       │
│          ││           │ hostname │ port │ pathname │     search     │       │
│          ││           │          │      │          ├─┬──────────────┤       │
│          ││           │          │      │          │ │    query     │       │
"  http:   // user:pass @ host.com : 8080   /p/a/t/h  ?  query=string   #hash "
│          ││           │          │      │          │ │              │       │
└──────────┴┴───────────┴──────────┴──────┴──────────┴─┴──────────────┴───────┘
(all spaces in the "" line should be ignored -- they are purely for formatting)

License

The MIT license