There was an error while loading. Please reload this page.
1 parent 6cd0e1d commit cc0c9f7Copy full SHA for cc0c9f7
2 files changed
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@driftos/client",
3
- "version": "0.1.0",
+ "version": "0.1.1",
4
"description": "JavaScript SDK for drift-core - conversation routing and context management",
5
"main": "dist/index.js",
6
"module": "dist/index.mjs",
src/client.ts
@@ -26,9 +26,11 @@ export class DriftClient {
26
const controller = new AbortController();
27
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
28
29
- const headers: Record<string, string> = {
30
- 'Content-Type': 'application/json',
31
- };
+ const headers: Record<string, string> = {};
+
+ if (body) {
32
+ headers['Content-Type'] = 'application/json';
33
+ }
34
35
if (this.apiKey) {
36
headers['Authorization'] = `Bearer ${this.apiKey}`;
0 commit comments