Skip to content

Commit

Permalink
doc: move baseUrl to baseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekacru committed Jul 26, 2024
1 parent 3a89e47 commit 2853c50
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions doc/content/docs/fetch-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const schema = createSchema({ // [!code highlight]
}) // [!code highlight]

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: schema // [!code highlight]
});

Expand All @@ -65,7 +65,7 @@ import { createFetch, createSchema } from "@better-fetch/fetch";
import { z } from "zod";

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: createSchema({
"/path": {
input: z.object({
Expand Down Expand Up @@ -97,7 +97,7 @@ import { createFetch, createSchema } from "@better-fetch/fetch";
import { z } from "zod";

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: createSchema({
"/path": {
output: z.object({
Expand All @@ -124,7 +124,7 @@ import { createFetch, createSchema } from "@better-fetch/fetch";
import { z } from "zod";

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: createSchema({
"/path": {
query: z.object({
Expand Down Expand Up @@ -177,7 +177,7 @@ const schema = createSchema({


const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: schema
})

Expand Down Expand Up @@ -215,7 +215,7 @@ import { createFetch, createSchema } from "@better-fetch/fetch";
import { z } from "zod";

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: createSchema({
"@put/user": { // [!code highlight]
input: z.object({
Expand Down Expand Up @@ -249,7 +249,7 @@ import { createFetch, createSchema } from "@better-fetch/fetch";
import { z } from "zod";

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: createSchema({
"/path": {
output: z.object({
Expand Down
6 changes: 3 additions & 3 deletions doc/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Create Fetch allows you to create a better fetch instance with custom configurat
import { createFetch } from "@better-fetch/fetch";

export const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
retry: {
type: "linear",
attempts: 3,
Expand Down Expand Up @@ -90,7 +90,7 @@ import { createFetch } from '@better-fetch/fetch';
import { z } from 'zod';

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
throw: true,
});

Expand Down Expand Up @@ -132,7 +132,7 @@ export const schema = createSchema({ // [!code highlight]
}) // [!code highlight]

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
schema: schema // [!code highlight]
});

Expand Down
2 changes: 1 addition & 1 deletion doc/content/docs/handling-errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ To address this, you have two options. If you use either option, the `error` obj
import { createFetch } from "@better-fetch/fetch";

export const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
retry: 2,
throw: true,
});
Expand Down
6 changes: 3 additions & 3 deletions doc/content/docs/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const myPlugin = {
} satisfies BetterFetchPlugin;

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
plugins: [myPlugin],
});
```
Expand Down Expand Up @@ -68,7 +68,7 @@ const myPlugin = {
} satisfies BetterFetchPlugin;

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
plugins: [myPlugin],
});
```
Expand Down Expand Up @@ -152,7 +152,7 @@ const plugin = {
} satisfies BetterFetchPlugin;

const $fetch = createFetch({
baseUrl: "https://jsonplaceholder.typicode.com",
baseURL: "https://jsonplaceholder.typicode.com",
plugins: [plugin],
});

Expand Down

0 comments on commit 2853c50

Please sign in to comment.