Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1015 Bytes

http-send.md

File metadata and controls

18 lines (11 loc) · 1015 Bytes

The HttpSend plugin allows you to monitor and retry HTTP calls depending on a response. For instance, you can implement call logging or retry a request if a server returns an error response (with the 4xx or 5xx status code).

The HttpSend plugin doesn't require installation. To use it, pass HttpSend to the HttpClient.plugin function and call the intercept method. The example below shows how to retry a request depending on the response status code:

{src="snippets/client-http-send/src/main/kotlin/com/example/Application.kt" include-lines="12-20"}

You can find the full sample here: client-http-send.