Server and APIs

Server and APIs

Professional Development

10 Qs

quiz-placeholder

Similar activities

Azure ArqSecDevSecOps Clase 3

Azure ArqSecDevSecOps Clase 3

Professional Development

15 Qs

HTML Basics

HTML Basics

Professional Development

15 Qs

HTML/CSS 1.dan

HTML/CSS 1.dan

Professional Development

14 Qs

OPTIMIZACIÓN DE  LA ESTRUCTURA DE UN SITIO WEB

OPTIMIZACIÓN DE LA ESTRUCTURA DE UN SITIO WEB

Professional Development

10 Qs

Aula 03 Web design

Aula 03 Web design

Professional Development

8 Qs

Information and Communication Technology

Information and Communication Technology

Professional Development

10 Qs

Day 1 PPP Training Refresher

Day 1 PPP Training Refresher

Professional Development

15 Qs

Programming Knowledge Quiz (Medium)

Programming Knowledge Quiz (Medium)

5th Grade - Professional Development

10 Qs

Server and APIs

Server and APIs

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?