Hi,
I am a wp developer and started learning frontity and I am fetching problems with jwt authentication and sending post data ? also How to work with multiple endpoints?
If anyone could give me a crud example with frontity that would be really appreciated.
Thanks in advance
1 Like
Hi @mahedicsit,
Frontity provides the fetch method that you can use to make requests to any endpoint adding proper headers for authentication
import { fetch } from "frontity";
const getFromSomeAPI = async (resource) => {
const response = await fetch("https://site.com/api/v1" + resource);
const body = await response.json();
return body;
};