Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update doc format and modify test unit
  • Loading branch information
wenningplus committed Jun 9, 2020
commit ce83a1a287ed683eea3b2971a08f48c6739dfefb
6 changes: 1 addition & 5 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,11 +746,7 @@ added: v0.4.0

### `request.method`
<!-- YAML
added: REPLACEME
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/33803
description: add request.method to doc.
added: v14.4.0
Comment thread
zhangwinning marked this conversation as resolved.
Outdated
-->

* {string} The request method.
Expand Down
8 changes: 3 additions & 5 deletions test/parallel/test-http-outgoing-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ const OutgoingMessage = http.OutgoingMessage;
{
const server = http.createServer(function(req, res) {
Comment thread
zhangwinning marked this conversation as resolved.
Outdated
res.end();
res.on('finish', () => {
server.close();
});
server.close();
});

server.listen(0);

server.on('listening', function() {
server.on('listening', common.mustCall(function() {
Comment thread
zhangwinning marked this conversation as resolved.
Outdated
const req = http.request({
port: server.address().port,
method: 'GET',
Expand All @@ -74,5 +72,5 @@ const OutgoingMessage = http.OutgoingMessage;
assert.strictEqual(req.host, 'localhost');
assert.strictEqual(req.protocol, 'http:');
req.end();
});
}));
}