Skip to content

Commit

Permalink
update res.end (#1719)
Browse files Browse the repository at this point in the history
* fix: update res.end documentation to include callback parameter

* fix: remove unnecessary semicolons in res.end examples

close #1708

---------

Co-authored-by: Ashu Yadav <90438479+AshuYadavYT@users.noreply.github.com>
  • Loading branch information
axhuwastaken and axhuwastaken authored Jan 6, 2025
1 parent 9fc86bb commit c8fe247
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _includes/api/en/4x/res-end.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3 id='res.end'>res.end([data] [, encoding])</h3>
<h3 id='res.end'>res.end([data[, encoding]][, callback])</h3>

Ends the response process. This method actually comes from Node core, specifically the [response.end() method of http.ServerResponse](https://nodejs.org/api/http.html#http_response_end_data_encoding_callback).
Ends the response process. This method actually comes from Node core, specifically the [response.end() method of http.ServerResponse](https://nodejs.org/api/http.html#responseenddata-encoding-callback).

Use to quickly end the response without any data. If you need to respond with data, instead use methods such as [res.send()](#res.send) and [res.json()](#res.json).

Expand Down
4 changes: 2 additions & 2 deletions _includes/api/en/5x/res-end.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3 id='res.end'>res.end([data] [, encoding])</h3>
<h3 id='res.end'>res.end([data[, encoding]][, callback])</h3>

Ends the response process. This method actually comes from Node core, specifically the [response.end() method of http.ServerResponse](https://nodejs.org/api/http.html#http_response_end_data_encoding_callback).
Ends the response process. This method actually comes from Node core, specifically the [response.end() method of http.ServerResponse](https://nodejs.org/api/http.html#responseenddata-encoding-callback).

Use to quickly end the response without any data. If you need to respond with data, instead use methods such as [res.send()](#res.send) and [res.json()](#res.json).

Expand Down

0 comments on commit c8fe247

Please sign in to comment.