To hit an endpoint (get call),what hook I should use. I am using refine dev antd.plz help #refine

I want to hit an endpoint (get call), what hook I should use or any other method. I am using refine dev antd. plz help #refine #antd #hooks #react
kapa.ai
kapa.ai360d ago
Hi @vamsikrishnaprasad. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- In refine with Ant Design, you can use the useCustom hook to make a GET request to an endpoint. Here's an example from the information extracts:
import { useCustom } from "@refinedev/core";

const { data } = useCustom({
url: "your_endpoint_url",
method: "get",
config: {
// Additional config like headers, query parameters, etc.
},
});
import { useCustom } from "@refinedev/core";

const { data } = useCustom({
url: "your_endpoint_url",
method: "get",
config: {
// Additional config like headers, query parameters, etc.
},
});
In this example, replace "your_endpoint_url" with the actual URL of the endpoint you want to make a GET request to. You can also provide additional configuration like headers, query parameters, etc., in the config property. For more information on the useCustom hook, you can refer to its documentation here (https://refine.dev/docs/api-reference/core/hooks/data/useCustom/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai360d ago
<@1031581338878349482> kapa.ai is still learning and improving, please let us how it did by reacting below
sensitive-blue
sensitive-blue360d ago
Any other method