From 6ca8b6e8161a2ebf3e60d9c2214442b17f0aeeca Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 5 Feb 2021 09:50:48 +0000 Subject: [PATCH] docs(readme): spelling and grammar --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1c84bf73..57f79e60 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ npm i fastify-reply-from ``` ## Compatibility with fastify-multipart -`fastify-reply-from` and [`fastify-multipart`](https://github.com/fastify/fastify-multipart) should not be registered as sibling plugins nor shold be registered in plugins which have a parent-child relationship.
The two plugins are incompatible, in the sense that the behavior of `fastify-reply-from` might not be the expected one when the above-mentioned conditions are not respected.
This is due to the fact that `fastify-multipart` consumes the multipart content by parsing it, hence this content is not forwarded to the target service by `fastify-reply-from`.
+`fastify-reply-from` and [`fastify-multipart`](https://github.com/fastify/fastify-multipart) should not be registered as sibling plugins nor should they be registered in plugins which have a parent-child relationship.
The two plugins are incompatible, in the sense that the behavior of `fastify-reply-from` might not be the expected one when the above-mentioned conditions are not respected.
This is due to the fact that `fastify-multipart` consumes the multipart content by parsing it, hence this content is not forwarded to the target service by `fastify-reply-from`.
However, the two plugins may be used within the same fastify instance, at the condition that they belong to disjoint branches of the fastify plugins hierarchy tree. ## Usage @@ -84,7 +84,7 @@ proxy.register(require('fastify-reply-from'), { #### `http` By default, Node's [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) -will be used if you don't enable [`http2`](#http2) or [`undici`](#undici). To customize the `request`, +will be used if you do not enable [`http2`](#http2) or [`undici`](#undici). To customize the `request`, you can pass in [`agentOptions`](https://nodejs.org/api/http.html#http_new_agent_options) and [`requestOptions`](https://nodejs.org/api/http.html#http_http_request_options_callback). To illustrate: @@ -102,7 +102,7 @@ proxy.register(require('fastify-reply-from'), { }) ``` -You can also pass a custom http agents. If you pass the agents, then the http.agentOptions will be ignored. To illustrate: +You can also pass custom http agents. If you pass the agents, then the http.agentOptions will be ignored. To illustrate: ```js proxy.register(require('fastify-reply-from'), { base: 'http://localhost:3001/', @@ -237,7 +237,7 @@ It must return the new headers object. #### `queryString` Replaces the original querystring of the request with what is specified. -This will get passed to +This will be passed to [`querystring.stringify`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options). #### `body` @@ -267,7 +267,7 @@ will be returned to the client. * [ ] support overriding the body with a stream * [ ] forward the request id to the other peer might require some - refacotring because we have to make the `req.id` unique + refactoring because we have to make the `req.id` unique (see [hyperid](https://npm.im/hyperid)). * [ ] Support origin HTTP2 push * [x] benchmarks