projeto-hit/backend/src/helpers/WhatsappOfficialAPI.ts

17 lines
373 B
TypeScript
Raw Normal View History

2023-08-28 17:05:53 +00:00
import axios from "axios";
import https from "https"
import http from "http"
2023-08-28 17:05:53 +00:00
const api = axios.create({
2023-09-08 19:50:51 +00:00
baseURL: process.env.URL_WHATSAPP_API,
2023-08-28 17:05:53 +00:00
headers: {
Accept: "application/json",
2023-09-08 19:50:51 +00:00
Authorization: `Bearer ${process.env.TOKEN}`
},
httpAgent: new http.Agent({ keepAlive: true }),
httpsAgent: new https.Agent({ keepAlive: true })
2023-08-28 17:05:53 +00:00
});
export default api;