Server and APIs

Quiz
•
Professional Development
•
Professional Development
•
Hard
Daniel Adesoji
Used 19+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When we use http.createServer(callback). The callback function takes in two objects, what are these?
request, response
handler,response
response,handler
request,process
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We want the content type of the response to be 'text/html'. Which of the following is the correct way to do it?
res.setHeader('content-type', 'text/html')
res.setHeader('content-type', 'application/json')
res.writeHeader('content-type', 'text/html')
res.writeHead('content-type', 'text/html')
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To set the status code of response, what would be the correct syntax?
res.writeHeader(200)
res.writeHead(200)
res.writeStatus(200)
res.writeCode(200)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When we query for data from an api, what code do we return when that data is not found
400
422
404
419
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When we build an API server, what content type do we set?
text/html
application/json
application/api
application/html
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To read the url from the request, what property of req do we use?
url
path
link
none of the options
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A request is creating a resource in your API server, the method is "req.method === ?"
PUT
PATCH
GET
POST
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Kuis BO Periode Januari 2023

Quiz
•
Professional Development
5 questions
Magento 2 Full Page Cache

Quiz
•
Professional Development
11 questions
Post-test Cyber Security CN Group

Quiz
•
Professional Development
10 questions
SMART CDOB: Warming-Up Quiz

Quiz
•
Professional Development
6 questions
Cuestionario Tarea 4.1

Quiz
•
Professional Development
10 questions
Searching Quiz

Quiz
•
Professional Development
12 questions
HTML5

Quiz
•
Professional Development
10 questions
AWS ACF Módulo 10 - Auto Scaling e monitoramento

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade