Skip to content

Commit

Permalink
Merge branch 'main' into thread-options
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Oct 18, 2024
2 parents d6e0d88 + 99b74d1 commit de723f3
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,33 @@ SELECT httpserve_start('localhost', 9999, 'supersecretkey');
│ HTTP server started on 0.0.0.0:9999
└───────────────────────────────────────────────┘
```
```

Query your endpoint using the `X-API-Key` token:

```bash
curl -X POST --header "X-API-Key: secretkey" -d "SELECT 'hello', version()" "http://localhost:9999/"
```

You can perform the same action from DuckDB using HTTP `extra_http_headers`:

```sql
D CREATE SECRET extra_http_headers (
TYPE HTTP,
EXTRA_HTTP_HEADERS MAP{
'X-API-Key': 'secret'
}
);

D SELECT * FROM duck_flock('SELECT version()', ['http://localhost:9999']);
┌─────────────┐
"version"() │
varchar
├─────────────┤
v1.1.1
└─────────────┘
```



#### 👉 QUERY UI
Browse to your endpoint and use the built-in quackplay interface _(experimental)_
Expand Down

0 comments on commit de723f3

Please sign in to comment.