Skip to content

Comments

Lab-07-Logan-Absher#6

Open
loganabsher wants to merge 2 commits intocodefellows-javascript-401d17:masterfrom
loganabsher:master
Open

Lab-07-Logan-Absher#6
loganabsher wants to merge 2 commits intocodefellows-javascript-401d17:masterfrom
loganabsher:master

Conversation

@loganabsher
Copy link

No description provided.

// to run this simply type: http :PORT or http localhost:PORT or http GET localhost:PORT
if(request.method === 'GET' && request.url.pathname === '/'){
response.statusCode = 200;
response.write(`Content-Type: ${response.headers['Content-Type']}\n`);

Choose a reason for hiding this comment

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

response.writeHead(200, { 'Content-Type': 'text/plain'});

if(request.method === 'GET' && request.url.pathname === '/'){
response.statusCode = 200;
response.write(`Content-Type: ${response.headers['Content-Type']}\n`);
response.write(`Status: ${response.statusCode}\n`);

Choose a reason for hiding this comment

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

no response status on response body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants