aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-11-09 22:25:14 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-11-09 22:25:14 +0900
commite44ecc10fe65ae0a3b5887e1bfcbf16a9acc152f (patch)
treec90d4d0a89a4bfe9f103497193815c0e17a996d2
parentcb0f800a28dd5b6875bcdf94eff64d5f4ae066cf (diff)
downloadplum-e44ecc10fe65ae0a3b5887e1bfcbf16a9acc152f.tar.gz
readme: update
-rw-r--r--README.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/README.md b/README.md
index 2bf6fe7..bbf7575 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ App = -> env {
[
200,
{ "Content-Type" => "text/plain" },
- [" request: #{env["REQUEST_METHOD"]} #{env["PATH_INFO"]}"]
+ ["request: #{env["REQUEST_METHOD"]} #{env["PATH_INFO"]}"]
]
}
@@ -51,6 +51,26 @@ NOTE: If `--cert` and `--key` are omitted, a temporary dummy certificate will be
### As a HTTP/2 (HTTP/1.x) client library
If the server does't support HTTP/2, `Plum::Client` tries to use HTTP/1.x instead.
+```
+ +-----------------+
+ |:http2 option | false
+ |(default: true) |-------> HTTP/1.x
+ +-----------------+
+ v true
+ +-----------------+
+ |:scheme option | "http"
+ |(default:"https")|-------> Try Upgrade from HTTP/1.1
+ +-----------------+
+ v "https"
+ +-----------------+
+ | ALPN(/NPN) | failed
+ | negotiation |-------> HTTP/1.x
+ +-----------------+
+ | "h2"
+ v
+ HTTP/2
+```
+
##### Sequential request
```ruby
client = Plum::Client.start("http2.rhe.jp", 443, user_agent: "nyaan")