# You can pass more parameters in "handleSubmit" functions. You can pass "refetch" and "method" also.
# Default method is "POST" so if you need something else, then you can pass your method in "method" parameters. Also there is one more parameters called "refetch" if after submission you need to refetch some other api's then you can pass specific refetch in "refetch" parameters.
# In this case: If your api is public, then you don't need to pass any type of token parameters.
# Default tokenType is "Bearer". If you need to pass token and your tokenType is different, then you can easily pass your tokenType in "tokenType" parameters and also you can pass the token in "token" parameters.
# In this case: If needed then you can manage your cookies using some amazing method from "react-api-call".
# There are three function available right now. # Using setCookies you can "set" data from cookies # Using getCookies you can "get" data from cookies # Using deleteCookie you can "delete" data from cookies
# In this case: token, tokenType, headersConfig are optional. If you need, then you can pass. Default token type is "Bearer" and if you need to change tokenType, then you can also change tokenType. But if you don't need to pass token! And if your api is public then you don't need to pass, "token" and "tokenType".
# Default headers have "Content-Type": "application/json", So if you need something else, then you can also modify headers, using the headersConfig parameter easily.
# You can delete a data in multiple ways, but if you have delete api like: something/deleteId - then you can use this, or if you need pass something in body or like post data then you can use useSubmitMethod.
# Also in this case, there are multiple access you have, you can change headersConfig, you needed you can change tokenType (by default bearer). Also you can pass the token.
);
}export default App;
lets-talk.js
Let's Talk
Say Goodbye to Api Headaches: Effortless Api Call With @react-api-call