Skip to content

Commit 6b03bcd

Browse files
authored
feat: add support for custom HTTP headers in API requests (#25)
* feat: add support for custom HTTP headers in API requests Introduced a new `headers` parameter in the constructor to allow customizing HTTP headers for all API requests. Added `setHeaders` and `getHeaders` methods for managing headers dynamically, and ensured integration with the existing request workflow. Updated the package version to 3.3.0 to reflect this enhancement. * run prettier
1 parent 4af893e commit 6b03bcd

File tree

8 files changed

+3351
-3340
lines changed

8 files changed

+3351
-3340
lines changed

.github/workflows/format-lint.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
name: format-lint.yaml
22

33
on:
4-
pull_request:
5-
branches:
6-
- master
4+
pull_request:
5+
branches:
6+
- master
77

88
jobs:
9-
format:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: '20'
16-
- run: npm ci
17-
- name: Prettier check
18-
run: npm run format:check
19-
- name: Lint the code
20-
run: npm run lint
9+
format:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '20'
16+
- run: npm ci
17+
- name: Prettier check
18+
run: npm run format:check
19+
- name: Lint the code
20+
run: npm run lint

.github/workflows/publish.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
name: Publish Package to npmjs
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
permissions:
11-
contents: read
12-
id-token: write
13-
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
16-
with:
17-
node-version: '20.x'
18-
registry-url: 'https://registry.npmjs.org'
19-
- run: npm ci
20-
- run: npm publish --provenance --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
- run: npm ci
20+
- run: npm publish --provenance --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.prettierrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"printWidth": 120,
3-
"trailingComma": "all",
4-
"singleQuote": true,
5-
"tabWidth": 4
6-
}
2+
"printWidth": 120,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"tabWidth": 4
6+
}

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
</a>
55
</p>
66

7-
INWX Domrobot Node.js Client
8-
=========
7+
# INWX Domrobot Node.js Client
8+
99
You can access all functions of our frontend via our API, which is available via the JSON-RPC protocol and thus can be easily consumed with all programming languages.
1010

1111
There is also an OT&E test system, which you can access via [ote.inwx.com](https://ote.inwx.com/en/). Here you will find the known web interface which is using a test database. On the OT&E system no actions will be charged. So you can test as much as you like there.
1212

13-
Documentation
14-
------
13+
## Documentation
14+
1515
You can view a detailed description of the API functions in our documentation. You can find the online documentation [by clicking here](https://www.inwx.de/en/help/apidoc).
1616

1717
If you still experience any kind of problems don't hesitate to contact our [support via email](mailto:[email protected]).
1818

19-
Installation
20-
-------
19+
## Installation
2120

2221
The recommended way is via npm:
2322

@@ -27,8 +26,7 @@ npm install --save domrobot-client
2726

2827
You can find more information about the package on [npmjs.org](https://www.npmjs.com/package/domrobot-client).
2928

30-
Example
31-
-------
29+
## Example
3230

3331
```typescript
3432
import { ApiClient, Language } from 'domrobot-client';
@@ -71,7 +69,6 @@ const asyncFunc = async () => {
7169
asyncFunc();
7270
```
7371

74-
License
75-
----
72+
## License
7673

7774
MIT

0 commit comments

Comments
 (0)