| 
									
										
										
										
											2023-08-28 17:05:53 +00:00
										 |  |  | import axios from "axios"; | 
					
						
							| 
									
										
										
										
											2024-04-12 21:33:15 +00:00
										 |  |  | 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}` | 
					
						
							| 
									
										
										
										
											2024-04-12 21:33:15 +00:00
										 |  |  |   }, | 
					
						
							|  |  |  |   httpAgent: new http.Agent({ keepAlive: true }),  | 
					
						
							|  |  |  |   httpsAgent: new https.Agent({ keepAlive: true }) | 
					
						
							| 
									
										
										
										
											2023-08-28 17:05:53 +00:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default api; |