File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ instance.patch(uri:string[, options: object])
135135
136136This middleware could add the ability to append object value to query string:
137137
138- ```
138+ ``` js
139139// Add query middleware
140140client .addMiddleware (query ());
141141
@@ -154,7 +154,7 @@ It will request to `http://api.example.com/endpoint/test?foo=FOO&bar=BAR`.
154154
155155Like ` query ` , this could be used to handle post form values.
156156
157- ```
157+ ``` js
158158// Add form middleware
159159client .addMiddleware (form ());
160160
@@ -171,7 +171,7 @@ client.post('test', {
171171
172172A convenience middleware to add headers to request.
173173
174- ```
174+ ``` js
175175// Add header middleware
176176client .addMiddleware (header ({
177177 ' X-Request-By' : ' FetchHttpClient' ,
@@ -183,7 +183,7 @@ client.addMiddleware(header({
183183
184184A convenience middleware to set User-Agent to headers.
185185
186- ```
186+ ``` js
187187// Add header middleware
188188client .addMiddleware (userAgent ({
189189 ' Client' : ' 1.1' ,
@@ -195,7 +195,7 @@ client.addMiddleware(userAgent({
195195
196196Convert object to request and parse from response.
197197
198- ```
198+ ``` js
199199// Add json middleware
200200client .addMiddleware (json ());
201201
You can’t perform that action at this time.
0 commit comments