Skip to content

Commit

Permalink
address issue #492. update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ryber committed Sep 13, 2023
1 parent 8d440e8 commit 3a9e301
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions UPGRADE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Due to engine changes there are some differences in behavior. Efforts have been
* Socket timeout is no longer set independent of connection timeout and has been removed
* There are no longer any monitoring threads to shut down, as such, all close methods and the registering of shutdown hooks have been removed.
* Using system props for proxy settings is false by default (was true in previous versions)
* max concurrent routes is no longer supported as this was a feature of Apache. concurrency(int, int) has been removed.

## Upgrading to Unirest 3.0
The primary difference in Unirest 3 is that the org.json dependency has been replaced by a clean-room implementation of org.json's interface using Google Gson as the engine.
Expand Down Expand Up @@ -107,7 +108,6 @@ Previous versions of unirest had configuration split across several different pl
```java
// Sometimes it was on Unirest
Unirest.setTimeouts(5000, 10000);
Unirest.setConcurrency(25, 10);

//Sometimes it was on Options
Options.setOption(HTTPCLIENT, client);
Expand All @@ -122,7 +122,6 @@ Unirest config allows easy access to build a configuration just like you would b
Unirest.config()
.socketTimeout(500)
.connectTimeout(1000)
.concurrency(10, 5)
.proxy(new Proxy("https://proxy"))
.setDefaultHeader("Accept", "application/json")
.followRedirects(false)
Expand Down
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ All configuration is now done through ```Unirest.config()```
Unirest.config()
.socketTimeout(500)
.connectTimeout(1000)
.concurrency(10, 5)
.proxy(new Proxy("https://proxy"))
.setDefaultHeader("Accept", "application/json")
.followRedirects(false)
Expand All @@ -552,7 +551,6 @@ Changing Unirest's config should ideally be done once, or rarely. There are seve
| Builder Method | Impact | Default |
| ------------- | ------------- | ------------- |
| ```connectTimeout(int)``` | Sets the connection timeout for all requests in millis | 10000 |
| ```concurrency(int, int)``` | Sets concurrency rates; max total, max per route | 200, 20 |
| ```proxy(proxy)``` | Sets a proxy object for negotiating proxy servers. Can include auth credentials | |
| ```setDefaultHeader(String, String)``` | Sets a default header. Will overwrite if it exists | |
| ```setDefaultHeader(String, Supplier<String>)``` | Sets a default header by supplier. Good for setting trace tokens for microservice architectures. Will overwrite if it exists | |
Expand Down

0 comments on commit 3a9e301

Please sign in to comment.