Skip to content

Commit

Permalink
feat: Set SDK version inside user agent header
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Dec 21, 2023
1 parent b763278 commit 7074cc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Doczilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import axios, { Axios } from 'axios'
import { PdfService } from './services/PdfService'
import { ScreenshotService } from './services/ScreenshotService'
import { WebhookService } from './services/WebhookService'
import { version } from '../package.json'

interface DoczillaOptions {
baseURL?: string
Expand All @@ -20,6 +21,7 @@ export default class Doczilla {
this.client = axios.create({
baseURL: options.baseURL || 'https://api.doczilla.app',
headers: {
'User-Agent': `Doczilla Node.js / ${version}`,
Authorization: `Bearer ${token}`
}
})
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"outDir": "dist",
"rootDir": "src/",
"moduleResolution": "node",
"resolveJsonModule": true,
"typeRoots": [
"node_modules/@types"
]
Expand Down

0 comments on commit 7074cc7

Please sign in to comment.