|
| 1 | +## This repo is an archive! |
1 | 2 |
|
2 |
| -<p align="center"> |
3 |
| - <img src="actions.png"> |
4 |
| -</p> |
5 |
| - |
6 |
| -# Actions Http-Client |
7 |
| - |
8 |
| -[](https://github.com/actions/http-client/actions) |
9 |
| - |
10 |
| -A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await. |
11 |
| - |
12 |
| -## Features |
13 |
| - |
14 |
| - - HTTP client with TypeScript generics and async/await/Promises |
15 |
| - - Typings included so no need to acquire separately (great for intellisense and no versioning drift) |
16 |
| - - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner |
17 |
| - - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. |
18 |
| - - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. |
19 |
| - - Redirects supported |
20 |
| - |
21 |
| -Features and releases [here](./RELEASES.md) |
22 |
| - |
23 |
| -## Install |
24 |
| - |
25 |
| -``` |
26 |
| -npm install @actions/http-client --save |
27 |
| -``` |
28 |
| - |
29 |
| -## Samples |
30 |
| - |
31 |
| -See the [HTTP](./__tests__) tests for detailed examples. |
32 |
| - |
33 |
| -## Errors |
34 |
| - |
35 |
| -### HTTP |
36 |
| - |
37 |
| -The HTTP client does not throw unless truly exceptional. |
38 |
| - |
39 |
| -* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. |
40 |
| -* Redirects (3xx) will be followed by default. |
41 |
| - |
42 |
| -See [HTTP tests](./__tests__) for detailed examples. |
43 |
| - |
44 |
| -## Debugging |
45 |
| - |
46 |
| -To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: |
47 |
| - |
48 |
| -``` |
49 |
| -export NODE_DEBUG=http |
50 |
| -``` |
51 |
| - |
52 |
| -## Node support |
53 |
| - |
54 |
| -The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. |
55 |
| - |
56 |
| -## Support and Versioning |
57 |
| - |
58 |
| -We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). |
59 |
| - |
60 |
| -## Contributing |
61 |
| - |
62 |
| -We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. |
63 |
| - |
64 |
| -once: |
65 |
| - |
66 |
| -```bash |
67 |
| -$ npm install |
68 |
| -``` |
69 |
| - |
70 |
| -To build: |
71 |
| - |
72 |
| -```bash |
73 |
| -$ npm run build |
74 |
| -``` |
75 |
| - |
76 |
| -To run all tests: |
77 |
| -```bash |
78 |
| -$ npm test |
79 |
| -``` |
| 3 | +The source code for the `@actions/http-client` package has moved to <https://github.com/actions/toolkit/tree/main/packages/http-client>. |
0 commit comments