Minor Changes
-
#4177
623691b10f0
Thanks @salihozdemir! - feat: add the abilities to pass custom headers and custom http method to the requestExample of changing the http method:
import { useUpdate } from "@refinedev/core"; const { mutate } = useUpdate(); mutate({ resource: "posts", id: 1, variables: { title: "New title", }, //highlight-start meta: { method: "put", }, //highlight-end });
Example of passing custom headers:
import { useOne } from "@refinedev/core"; useOne({ resource: "posts", id: 1, //highlight-start meta: { headers: { "X-Custom-Header": "Custom header value", }, }, //highlight-end });