github refinedev/refine @refinedev/simple-rest@4.5.0

Minor Changes

  • #4177 623691b10f0 Thanks @salihozdemir! - feat: add the abilities to pass custom headers and custom http method to the request

    Example 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
    });

Don't miss a new refine release

NewReleases is sending notifications on new releases.