Skip to content

Commit 28d0bee

Browse files
committed
changelog
1 parent 1c5883d commit 28d0bee

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ We’ve reworked our request routing system from top to bottom to make things sm
2424
**HTTP Basic Authentication**
2525
SQLPage’s `sqlpage.fetch(request)` function now supports HTTP Basic Authentication. Quickly call external APIs that require a username and password. For example, in PostgreSQL:
2626
```sql
27-
SELECT sqlpage.fetch(
28-
'https://api.example.com/data',
29-
JSON_OBJECT(
30-
'auth', JSON_OBJECT('username', 'user', 'password', 'pass')
31-
)
32-
);
27+
SET result = sqlpage.fetch(json_object(
28+
'url', 'https://api.example.com/data',
29+
'username', 'user',
30+
'password', 'pass'
31+
));
3332
```
3433
Learn more in the [fetch documentation](https://sql-page.com/documentation.sql?component=fetch#component).
3534

0 commit comments

Comments
 (0)