Skip to content

Commit

Permalink
feat(docs): show http-client on simple-rest usage (#6350)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicanerdurmaz authored Sep 19, 2024
1 parent 692500b commit a98675f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions documentation/docs/data/packages/simple-rest/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ Simple REST package exports a function that accepts `apiUrl` and `httpClient` pa

```tsx title="app.tsx"
import { Refine } from "@refinedev/core";
// highlight-next-line
// highlight-start
import dataProvider from "@refinedev/simple-rest";
import axios from "axios";
// highlight-end

// highlight-start
const httpClient = axios.create();

const App = () => {
return (
<Refine
// highlight-next-line
dataProvider={dataProvider("<API_URL>")}
// highlight-start
// `httpClient` is optional.
dataProvider={(dataProvider("<API_URL>"), httpClient)}
// highlight-end
/* ... */
/>
);
Expand Down

0 comments on commit a98675f

Please sign in to comment.