refactor: enhance blog functionality with related blogs fetching, improved loading states, and tag filtering
This commit is contained in:
+9
-1
@@ -1,8 +1,16 @@
|
||||
import axios from "axios";
|
||||
import https from "https";
|
||||
|
||||
// Create axios instance with SSL verification disabled for development
|
||||
const axiosInstance = axios.create({
|
||||
httpsAgent: new https.Agent({
|
||||
rejectUnauthorized: false
|
||||
})
|
||||
});
|
||||
|
||||
export const fetchReq = async (url, headers) => {
|
||||
try {
|
||||
const response = await axios.get(url, headers);
|
||||
const response = await axiosInstance.get(url, headers);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("fetchReq error:", error.message);
|
||||
|
||||
Reference in New Issue
Block a user