Skip to content

Commit

Permalink
doc: delint
Browse files Browse the repository at this point in the history
PR-URL: #14707
Refs: #12756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
refack authored and addaleax committed Aug 14, 2017
1 parent 230cb55 commit 621c03a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1850,8 +1850,8 @@ const server = http2.createServer((req, res) => {
});
```

In order to create a mixed [HTTPS](https) and HTTP/2 server, refer to the
[ALPN negotiation](alpn-negotiation) section.
In order to create a mixed [HTTPS][] and HTTP/2 server, refer to the
[ALPN negotiation][] section.
Upgrading from non-tls HTTP/1 servers is not supported.

The HTTP2 compatibility API is composed of [`Http2ServerRequest`]() and
Expand All @@ -1861,10 +1861,10 @@ the status message for HTTP codes is ignored.

### ALPN negotiation

ALPN negotiation allows to support both [HTTPS](https) and HTTP/2 over
ALPN negotiation allows to support both [HTTPS][] and HTTP/2 over
the same socket. The `req` and `res` objects can be either HTTP/1 or
HTTP/2, and an application **must** restrict itself to the public API of
[HTTP/1](), and detect if it is possible to use the more advanced
[HTTP/1][], and detect if it is possible to use the more advanced
features of HTTP/2.

The following example creates a server that supports both protocols:
Expand Down Expand Up @@ -1925,7 +1925,7 @@ abnormally aborted in mid-communication.
added: REPLACEME
-->

Indicates that the underlying [`Http2Stream`]() was closed.
Indicates that the underlying [`Http2Stream`][] was closed.
Just like `'end'`, this event occurs only once per response.

#### request.destroy([error])
Expand All @@ -1935,7 +1935,7 @@ added: REPLACEME

* `error` {Error}

Calls `destroy()` on the [Http2Stream]() that received the `ServerRequest`. If
Calls `destroy()` on the [`Http2Stream`][] that received the [`ServerRequest`][]. If
`error` is provided, an `'error'` event is emitted and `error` is passed as an
argument to any listeners on the event.

Expand Down Expand Up @@ -2570,21 +2570,21 @@ will result in a [`TypeError`][] being thrown.
added: REPLACEME
-->

Call [`stream.pushStream()`]() with the given headers, and wraps the
Call [`stream.pushStream()`][] with the given headers, and wraps the
given newly created [`Http2Stream`] on `Http2ServerRespose`.

The callback will be called with an error with code `ERR_HTTP2_STREAM_CLOSED`
if the stream is closed.

[HTTP/2]: https://tools.ietf.org/html/rfc7540
[HTTP/1]: http.html
[https]: https.html
[HTTPS]: https.html
[`net.Socket`]: net.html
[`tls.TLSSocket`]: tls.html
[`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener
[`ClientHttp2Stream`]: #http2_class_clienthttp2stream
[Compatibility API]: #http2_compatibility_api
[alpn-negotiation]: #http2_alpn_negotiation
[ALPN negotiation]: #http2_alpn_negotiation
[`Duplex`]: stream.html#stream_class_stream_duplex
[Headers Object]: #http2_headers_object
[`Http2Stream`]: #http2_class_http2stream
Expand Down
6 changes: 4 additions & 2 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ to be added to the error object. If the optional parameter is NULL
then no code will be associated with the error. If a code is provided,
the name associated with the error is also updated to be:
```
```text
originalName [code]
```

where originalName is the original name associated with the error
and code is the code that was provided. For example if the code
is 'ERR_ERROR_1' and a TypeError is being created the name will be:

```
```text
TypeError [ERR_ERROR_1]
```

Expand Down Expand Up @@ -3342,6 +3342,8 @@ support it:
* If the function is not available, provide an alternate implementation
that does not use the function.

<!-- it's very convenient to have all the anchors indexed -->
<!--lint disable no-unused-definitions remark-lint-->
[Asynchronous Operations]: #n_api_asynchronous_operations
[Basic N-API Data Types]: #n_api_basic_n_api_data_types
[ECMAScript Language Specification]: https://tc39.github.io/ecma262/
Expand Down

0 comments on commit 621c03a

Please sign in to comment.