docs: Fix JS example in custom auth how-tos (#4536)

Should be `defaultHeaders`:
https://github.com/langchain-ai/langgraph/blob/main/libs/sdk-js/src/client.ts#L76
This commit is contained in:
Jacob Lee
2025-05-05 12:35:00 -07:00
committed by GitHub
parent 306915690c
commit 8837f8452c
+1 -1
View File
@@ -112,7 +112,7 @@ Assuming you are using JWT token authentication, you could access your deploymen
const my_token = "your-token"; // In practice, you would generate a signed token with your auth provider
const client = new Client({
apiUrl: "http://localhost:2024",
headers: { Authorization: `Bearer ${my_token}` },
defaultHeaders: { Authorization: `Bearer ${my_token}` },
});
const threads = await client.threads.search();
```