nodeunit-api-client 1.5.0 → 1.6.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.
Files changed (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -30,7 +30,7 @@ npm install nodeunit-api-client
30
30
  const HttpClient = require('nodeunit-api-client');
31
31
 
32
32
  const api = new HttpClient({
33
- protocol: 'https',
33
+ https: true,
34
34
  host: 'api.example.com',
35
35
  port: 443,
36
36
  path: '/v1'
@@ -49,7 +49,7 @@ api.get(null, '/users', function(response) {
49
49
  const HttpClient = require('nodeunit-api-client');
50
50
 
51
51
  const api = new HttpClient({
52
- protocol: 'https',
52
+ https: true,
53
53
  host: 'api.example.com'
54
54
  });
55
55
 
@@ -94,7 +94,7 @@ api.get(null, '/search', {
94
94
 
95
95
  ```javascript
96
96
  new HttpClient({
97
- protocol: 'http', // 'http' or 'https' (default: 'http')
97
+ https: true, // 'http' or 'https' (default: 'http')
98
98
  host: 'localhost', // Server hostname
99
99
  port: 80, // Server port (default: 80 for http, 443 for https)
100
100
  path: '', // Base path (e.g. '/api/v1')
@@ -183,7 +183,7 @@ npm test
183
183
 
184
184
  ```javascript
185
185
  const api = new HttpClient({
186
- protocol: 'https',
186
+ https: true,
187
187
  host: 'api.example.com',
188
188
  auth: 'username:password'
189
189
  });
@@ -197,7 +197,7 @@ api.get(null, '/protected', function(response) {
197
197
 
198
198
  ```javascript
199
199
  const api = new HttpClient({
200
- protocol: 'https',
200
+ https: true,
201
201
  host: 'api.example.com',
202
202
  reqHeaders: {
203
203
  'X-API-Key': 'your-api-key',
@@ -229,7 +229,7 @@ api.get(null, '/endpoint', function(response) {
229
229
  const HttpClient = require('nodeunit-api-client');
230
230
 
231
231
  const api = new HttpClient({
232
- protocol: 'https',
232
+ https: true,
233
233
  host: 'jsonplaceholder.typicode.com'
234
234
  });
235
235
 
@@ -262,7 +262,7 @@ exports.apiTests = {
262
262
  };
263
263
  ```
264
264
  ```bash
265
- Copyright (c) 2024 Sabri
265
+ Copyright (c) 2026 Sabri
266
266
 
267
267
  Permission is hereby granted, free of charge, to any person obtaining a copy
268
268
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodeunit-api-client",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Lightweight HTTP/HTTPS client with built-in testing assertions for Nodeunit",
5
5
  "main": "src/httpclient.js",
6
6
  "exports": {
@@ -21,12 +21,12 @@
21
21
  "license": "MIT",
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git+https://github.com/ssabri1996/nodeunit-httpclient.git"
24
+ "url": "git+https://github.com/ssabri1996/nodeunit-api-client.git"
25
25
  },
26
26
  "bugs": {
27
- "url": "https://github.com/ssabri1996/nodeunit-httpclient/issues"
27
+ "url": "https://github.com/ssabri1996/nodeunit-api-client/issues"
28
28
  },
29
- "homepage": "https://github.com/ssabri1996/nodeunit-httpclient#readme",
29
+ "homepage": "https://github.com/ssabri1996/nodeunit-api-client#readme",
30
30
  "scripts": {
31
31
  "test": "npx nodeunit test/httpclient.test.js",
32
32
  "prepublishOnly": "npm test"