Skip to content

Commit

Permalink
Update README offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bpapillon committed Jan 3, 2025
1 parent da96f59 commit bfb951c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Schematic schematic = Schematic.builder()

### Offline Mode

In development or testing environments, you may want to avoid making network requests to the Schematic API. You can run Schematic in offline mode; in this case, it does not matter what API key you specify:
In development or testing environments, you may want to avoid making network requests when checking flags or submitting events. You can run Schematic in offline mode:

```java
import com.schematic.api.Schematic;
Expand All @@ -212,6 +212,8 @@ Schematic schematic = Schematic.builder()
.build();
```

While in offline mode, flag checks will return the default value for the flag being checked, and events will no-op. Other API calls will still be attempted as normal; offline mode does not affect these.

Offline mode works well with flag defaults:

```java
Expand Down

0 comments on commit bfb951c

Please sign in to comment.