Skip to content

Commit

Permalink
rephrased the runWithClient section in dart
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhaintz committed Aug 14, 2024
1 parent b1604c2 commit c5df770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/platforms/dart/integrations/http-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: "Learn more about the Sentry HTTP integration for the Dart SDK."
sidebar_order: 2
---

## Using the `runWithClient` function
## Using the `SentryHttpClient` function

With [`runWithClient`](https://pub.dev/documentation/http/latest/http/runWithClient.html), you can define a global `SentryHttpClient` and run it in its own [`Zone`](https://api.dart.dev/stable/3.4.4/dart-async/Zone-class.html).
Depending on your use case, you can either use the `SentryHttpClient` directly and call its methods (see the `default` tab), or you can use the [`runWithClient`](https://pub.dev/documentation/http/latest/http/runWithClient.html) function (see the `runWithClient` tab). With [`runWithClient`](https://pub.dev/documentation/http/latest/http/runWithClient.html), a fresh instance of the `client` is used and the other instances are not affected. It also runs in a separate [`Zone`](https://api.dart.dev/stable/3.5.0/dart-async/Zone-class.html), allowing you to override the functionality of the existing [`Zone`](https://api.dart.dev/stable/3.5.0/dart-async/Zone-class.html).

### Usage

Expand Down

0 comments on commit c5df770

Please sign in to comment.