Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fixed ambiguity in http.md and https.md #48692

Closed
wants to merge 1 commit into from
Closed

Conversation

an5er
Copy link
Contributor

@an5er an5er commented Jul 7, 2023

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem. labels Jul 7, 2023
Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence removed ("Properties that are inherited from the prototype are ignored.") is actually correct (see #48688 (comment)) and was added in e1161a3.

Anyway I'm fine with removing it to avoid confusion.

You might also want to remove "sets the method to GET and" from the sentence

The only difference between this method and `http.request()` is that it sets the
method to GET and calls `req.end()` automatically.

a few lines below.

@lpinca
Copy link
Member

lpinca commented Jul 7, 2023

Also please do the same for https.get().

@an5er
Copy link
Contributor Author

an5er commented Jul 7, 2023

I think this sentence is correct

The only difference between this method and `http.request()` is that it sets the
method to GET and calls `req.end()` automatically.

@an5er
Copy link
Contributor Author

an5er commented Jul 7, 2023

You're right, brother. I'll do it

@an5er an5er mentioned this pull request Jul 7, 2023
@lpinca
Copy link
Member

lpinca commented Jul 7, 2023

I think this sentence is correct

It doesn't set the method to GET, it use options object. If the method option is not set then it defaults to GET, otherwise it uses the method specified by the method option.

const http = require('http');

const server = http.createServer();

server.on('request', function (request, response) {
  console.log(request.method); // Prints: POST
  response.end('OK');
});

server.listen(function () {
  const { port } = server.address();
  const request = http.get(`http://localhost:${port}`, { method: 'POST' });

  request.on('response', function (response) {
    response.resume();
    response.on('end', function () {
      server.close();
    });
  });
});

@lpinca
Copy link
Member

lpinca commented Jul 7, 2023

Can you please remove the merge commit?

@an5er
Copy link
Contributor Author

an5er commented Jul 7, 2023

Yeah, i did it

@lpinca
Copy link
Member

lpinca commented Jul 7, 2023

I see a merge commit here https://github.com/nodejs/node/pull/48692/commits.

@an5er
Copy link
Contributor Author

an5er commented Jul 7, 2023

I fixed it

@an5er an5er requested a review from benjamingr July 7, 2023 15:24
@an5er an5er changed the title fix http.md doc: fix the ambiguity in http.md Jul 8, 2023
@an5er an5er changed the title doc: fix the ambiguity in http.md doc: fix the ambiguity Jul 8, 2023
@an5er an5er changed the title doc: fix the ambiguity doc: fixed ambiguity in http.md and https.md Jul 8, 2023
@an5er an5er force-pushed the main branch 2 times, most recently from 598f56a to cb9d30a Compare July 8, 2023 09:34
@an5er an5er requested review from lpinca, ronag and marco-ippolito July 8, 2023 09:36
@an5er
Copy link
Contributor Author

an5er commented Jul 8, 2023

I apologize for modifying my changes to meet the requirements. Please review them again.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Jul 9, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 9, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@marco-ippolito marco-ippolito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nodejs-github-bot
Copy link
Collaborator

lpinca pushed a commit that referenced this pull request Jul 12, 2023
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@lpinca
Copy link
Member

lpinca commented Jul 12, 2023

Landed in 8610be7.

@lpinca lpinca closed this Jul 12, 2023
juanarbol pushed a commit that referenced this pull request Jul 13, 2023
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@juanarbol juanarbol mentioned this pull request Jul 13, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48692
Fixes: nodejs#48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48692
Fixes: nodejs#48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ruyadorno pushed a commit that referenced this pull request Sep 12, 2023
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Sep 13, 2023
ruyadorno pushed a commit that referenced this pull request Sep 17, 2023
PR-URL: #48692
Fixes: #48688
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants