Skip to content

Commit

Permalink
Drop HTTP/2, as it doesn't work in Node 10 any more
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Sep 13, 2018
1 parent 9c7a97e commit b08371c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ matrix:
include:
- node_js: "9"
env: BROWSER=1
- node_js: "10"
env: HTTP2_TEST=1

before_install:
- "test -z $(echo $HTTP2_TEST) || npm install --only=dev https://github.com/sogaani/express.git#initial-support-http2"
- "rm -f package-lock.json npm-shrinkwrap.json"
9 changes: 0 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ The HTTP method defaults to __GET__, so if you wish, the following is valid:

});

## Using HTTP/2

To make a request using HTTP/2 protocol only (with no HTTP/1.x fallback), use the `.http2()` method. Currently we do not have auto-detection of HTTP/2-capable servers. This feature is experimental.

const request = require('superagent');
const res = await request
.get('https://example.com/h2')
.http2();

## Setting header fields

Setting header fields is simple, invoke `.set()` with a field name and value:
Expand Down

0 comments on commit b08371c

Please sign in to comment.