Skip to content

Commit

Permalink
Merge pull request #61 from sykes10/master
Browse files Browse the repository at this point in the history
Update setHeaders docs
  • Loading branch information
Gomah authored Mar 23, 2024
2 parents 5087561 + 53941b8 commit 7e4b5ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ If you want to set headers after the GraphQLClient has been initialised, you can
```ts
const { $graphql } = useNuxtApp();

// Set a single header
// Override all existing headers
$graphql.default.setHeaders({ authorization: 'Bearer MY_TOKEN' });

// Override all existing headers
// Set a single header
$graphql.default.setHeader('authorization', 'Bearer MY_TOKEN');
```

Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/examples/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ If you want to set headers after the GraphQLClient has been initialised, you can
```ts
const { $graphql } = useNuxtApp();

// Set a single header
// Override all existing headers
$graphql.default.setHeaders({ authorization: 'Bearer MY_TOKEN' });

// Override all existing headers
// Set a single header
$graphql.default.setHeader('authorization', 'Bearer MY_TOKEN');
```

Expand Down

0 comments on commit 7e4b5ea

Please sign in to comment.