Skip to content

Commit 9d69c39

Browse files
authored
Merge pull request #41 from RayRacine/explicit-close
Add close() method on the Client.
2 parents 4e6490c + b7e4bd7 commit 9d69c39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

featherbed-core/src/main/scala/featherbed/Client.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ class Client(
7070
def delete(relativePath: String): DeleteRequest[Coproduct.`"*/*"`.T] =
7171
DeleteRequest[Coproduct.`"*/*"`.T](baseUrl.toURI.resolve(relativePath).toURL, List.empty)
7272

73+
/**
74+
* Close this client releasing allocated resources.
75+
*/
76+
def close (): Unit =
77+
httpClient.close()
78+
7379
protected def clientTransform(client: Http.Client): Http.Client = client
7480

7581
protected val client = clientTransform(Client.forUrl(baseUrl))

0 commit comments

Comments
 (0)