You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternately, you can simply [clone this repository](https://github.com/socketlabs/socketlabs-java.git) directly to include the source code in your project.
64
64
@@ -191,6 +191,9 @@ This example demonstrates how to embed an image in your message.
191
191
### [Basic send with a web proxy](https://github.com/socketlabs/socketlabs-java/tree/master/examples/src/main/java/examples/basic/BasicSendWithProxy.java)
192
192
This example demonstrates how to use a proxy with your HTTP client.
193
193
194
+
### [Basic send with retry enabled](https://github.com/socketlabs/socketlabs-java/tree/master/examples/src/main/java/examples/basic/BasicSendWithRetry.java)
195
+
This example demonstrates how to use the retry logic with your HTTP client.
196
+
194
197
### [Basic send with invalid file attachment](https://github.com/socketlabs/socketlabs-java/tree/master/examples/src/main/java/examples/basic/invalid/BasicSendWithInvalidAttachment.java)
195
198
This example demonstrates the results of attempting to do a send with an invalid attachment.
196
199
@@ -229,6 +232,7 @@ For more information about AMP please see [AMP Project](https://amp.dev/document
229
232
230
233
<aname="version"></a>
231
234
# Version
235
+
* 1.2.1 - Adding optional retry logic for Http requests. If configured, the request will retry when certain 500 errors occur (500, 502, 503, 504)
232
236
* 1.1.1 - Adding request timeout value on the client for Http requests
/// Creates a new instance of the <c>RetrySettings</c>.
16
+
/// </summary>
17
+
/// <param name="maximumRetries"></param>
18
+
publicRetrySettings(intmaximumRetries){
19
+
if (maximumRetries < 0)
20
+
thrownewIllegalArgumentException("maximumNumberOfRetries must be greater than 0");
21
+
if (maximumRetries > 5)
22
+
thrownewIllegalArgumentException("The maximum number of allowed retries is " + maximumAllowedNumberOfRetries);
23
+
maximumNumberOfRetries = maximumRetries;
24
+
}
25
+
26
+
/// <summary>
27
+
/// The maximum number of retries when sending an Injection API Request before throwing an exception. Default: 0, no retries, you must explicitly enable retry settings
0 commit comments