Merge pull request #3 from TxtDot/artegoser

feat: custom axios instance
This commit is contained in:
Artemy Egorov 2023-08-14 14:18:08 +03:00 committed by GitHub
commit b6851d2174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import { Readability } from "@mozilla/readability";
import axios from "axios";
import axios from "../types/axios";
import { JSDOM } from "jsdom";
import { IHandlerOutput } from "./handler.interface";

7
src/types/axios.ts Normal file
View File

@ -0,0 +1,7 @@
import axios from "axios";
export default axios.create({
headers: {
"User-Agent": "txtdot",
},
});