skip to Main Content

Reactjs – AxiosError {message: 'Network Error' } while I make the axios.post for login form

I make the simple interceptors use axios: import axios from "axios"; const $api = axios.create({ withCredentials: true, baseURL: "http://localhost:9000/api", }); $api.interceptors.request.use((config) => { config.headers.Authorization = `Bearer ${localStorage.getItem("accessToken")}`; console.log("The config from $api.interceptors.request:", config) return config; }); export default $api; Next create…

VIEW QUESTION

How to get newly created product id while using after plugin (Interceptor) in Magento 2

I have created interceptor for catalog product controller's save action <type name="MagentoCatalogControllerAdminhtmlProductSave"> <plugin name="ricky_catalog_save_product" type="RickyCatalogPluginProductSave" sortOrder="10" /> </type> My plugin class is below namespace RickyCatalogPluginProduct; class Save { public function afterExecute( MagentoCatalogControllerAdminhtmlProductSave $subject, $result) { $productId = $subject->productId; // This…

VIEW QUESTION
Back To Top
Search