diff options
author | adamw <adam@warski.org> | 2017-09-14 10:28:30 +0100 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-09-14 10:28:30 +0100 |
commit | a971d409cb1063a2089d936abf3d3ab70bbbabb6 (patch) | |
tree | 40cee5eaba1199b396ae9400c4d0652dd3d1998b | |
parent | b972784f051f81156a28671cc56f9d4e26915174 (diff) | |
download | sttp-a971d409cb1063a2089d936abf3d3ab70bbbabb6.tar.gz sttp-a971d409cb1063a2089d936abf3d3ab70bbbabb6.tar.bz2 sttp-a971d409cb1063a2089d936abf3d3ab70bbbabb6.zip |
Readme
-rw-r--r-- | README.md | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -42,6 +42,16 @@ See also the [introduction to sttp](https://softwaremill.com/introducing-sttp-th and [sttp streaming & URI interpolators](https://softwaremill.com/sttp-streaming-uri-interpolator) blogs. +## Non-goals of the project + +* implement a full HTTP client. Instead, sttp wraps existing HTTP clients, +providing a consistent, programmer-friendly API. All network-related concerns +such as sending the requests, connection pooling, receiving responses are +delegated to the chosen backend +* provide ultimate flexibility in defining the request. While it's possible +to define *most* valid HTTP requests, e.g. some of the less common body +chunking approaches aren't available + ## How is sttp different from other libraries? * immutable request builder which doesn't impose any order in which request @@ -177,7 +187,11 @@ uri"$scheme://$subdomains.example.com?x=$vx&$params#$jumpTo" // https://sub1.sub2.example.com?x=y+z&a=1&b=2#section2 ``` -## Cleaning up +## Starting & cleaning up + +In case of most handlers, you should only instantiate a handler once per +application, as a handler typically allocates resources such as thread or +connection pools. When ending the application, make sure to call `handler.close()`, which will free up resources used by the backend (if any). The close process might be |