Skip to content

Commit be1eed2

Browse files
committed
Update README to be consistent with clients
1 parent 861c859 commit be1eed2

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ public class MyApp {
6363
}
6464
```
6565

66-
The user agent value will be prepended to additional user-agent information set by default in this library. While it is not strictly necessary to set the user agent, it is often helpful for the team at DNSimple when debugging, so please consider setting it.
67-
6866
### List request options
6967

7068
For endpoints that support it, you can set options to filter, limit, and sort the results that the API produces thanks to the `ListOptions` class.
@@ -92,7 +90,9 @@ public class MyApp {
9290
}
9391
```
9492

95-
## Sandbox Usage
93+
## Configuration
94+
95+
### Sandbox Environment
9696

9797
If you would like to test in the [DNSimple sandbox environment](https://developer.dnsimple.com/sandbox/) then add the `sandbox()` builder method to your client:
9898

@@ -114,8 +114,23 @@ public class MyApp {
114114
}
115115
```
116116

117+
We highly recommend testing against our sandbox environment before using our production environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.
118+
117119
You will need to ensure you are using an access token created in the sandbox environment. Production tokens will *not* work in the sandbox environment.
118120

121+
### Setting a custom `User-Agent` header
122+
123+
You can customize the `User-Agent` header for the calls made to the DNSimple API:
124+
125+
```java
126+
Client client = new Client.Builder()
127+
.accessToken("YOUR-ACCESS-TOKEN")
128+
.extraUserAgent("my-app/1.0")
129+
.build();
130+
```
131+
132+
The user agent value will be prepended to additional user-agent information set by default in this library. While it is not strictly necessary to set the user agent, it is often helpful for the team at DNSimple when debugging, so please consider setting it.
133+
119134
## Stub for Testing
120135

121136
When developing unit tests for your application, you should stub responses from this client to avoid making any network calls.

0 commit comments

Comments
 (0)