Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Web Api

The document contains questions about Web API in .NET. Web API is a lightweight architecture ideal for mobile devices with limited bandwidth. It supports HTTP and JSON request/response formats. Controllers in Web API inherit from ApiController and methods can be accessed via attributes like [Authorize]. Web API follows REST architecture and uses HTTP for communication.

Uploaded by

Ritika Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Web Api

The document contains questions about Web API in .NET. Web API is a lightweight architecture ideal for mobile devices with limited bandwidth. It supports HTTP and JSON request/response formats. Controllers in Web API inherit from ApiController and methods can be accessed via attributes like [Authorize]. Web API follows REST architecture and uses HTTP for communication.

Uploaded by

Ritika Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Web api

1. Which of the following client is used to send http request


A http client
B web client
C proxy client
D messageclient

2 which of the following .net framework supports webapi


A3
B1
C2
D4

3 ____________is lightweight architecture and ideal for devices that


have limited bandwidth like smartphones
A wcf
B webapi
C web services
D all the above

4 web api supports which of the following protocol


A tcp
B http
C soap
D all

5 webapiconfig.cs is file under in which app folder


A app_start
B app_data
C context
D views

6user created webapi controller is inherited from which class in .NET


framework
A apicontroller
B controller
C controllerbase
D webapi controller

7 webapi support which of the following code on successful execution


A 20
B 201
C 200
D 404

8 webapi support which of the following request response format


A xml
B json
C bson
D all

9which of the following type of routing is supported in webapi2.0


A attribute
B convention based
C all
D none

10 which of the following attribute ensures that the web api methods are
accessed only after logging in with valid username and password(not
sure)
A [Authorize]
B [Authenticate]
C [identity]l
D [Route]

11 which of the following method name are allowed in webapi for


GET(once check)
A get
B getbooks
C getallbooks
D all
12in which format webapi exposes model data
A only xml
B only json
C both a and b
D only soap

13 what is rest
A rest is another HTTP protocol
B rest is a soap based protocol
C rest is a kerberos standard
D rest is an architecture style for providing standard between computer
system on the web

14 consider the following url in asp.net web api(once check)


http://localhost:portnumber/api/products
The above url would look for a
A web api productscontroller
B web api productcontroller
C mvc productscontroller
D mvc productcontroller

15 a web api service can be consumed by using which one of the


following methods(not sure)
A using httpclient class
B using jquery ajax
C using xmlhttprequest
D all

16 a. Webapi uses http protocol for communication


B. messages are exchanged in soap format in webapi
Both true

17 which one of the following request header should be added to request


webapi to return data in xml format
A Returns: “application/xml”
B Accept:”application/xml”
C Return-DataFormat:”application/xml”
D none

18 a web api supports multiple protocols for communication like http,tcp,


named pipes.
B web api services can be hosted in IIS

You might also like