Quiz
REST and servlets
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (16)
1Describe the general format of a REST call
- AGET
POST +URL
DELETE
PUT - BGET
POST +URL
DELETE
DROP - CSELECT
UPDATE
FROM
DELETE
- AGET
2Which REST command can be used to update a resource?
- APUT
- BGET
- CPOST +URL
- DDELETE
3Give two types of representations of resources that are frequently used with REST
- AXML & JSON
- BCSV & JSON
- CCSV & XML
- DJSON & TXT
4What is meant by the phrase “REST is stateless”?
- AThe server does not keep track of client states
- BThe server accepts all the client states
- CThe server doesn't checks the client states
5What is a servlet?
- AA servlet is a class for handling http-request; a class that implements the HttpServlet interface.
- BA servlet is a class for handling resources (xml and json); a class that implements the resource handling interface
6What is a servlet engine? Give an example.
- AA program that can run servlets and exchange information with servlets. Like Tomcat, glassfish
- BA program that can run servlets and exchange information with resources. Like Tomcat, glassfish
- CA program that can run resources and exchange information with servlets. Like Tomcat, glassfish
7Which servlet-method is called in response to a http GET-command?
- AThe doGet method
- BThe doSelect method
- CThe doFind method
8Which annotation is used in JAVA-RS to specify the relative path of a resource?
- A@path ( )
- B@route ( )
- C@get ( )
9The doGet method of the httpServlet class contains two parameters. The first parameter is of the class HttpServletRequest. Describe the second parameter.
- AHttpServletResponse response
In the object response the http-response is built - BHttpServletResponse get
In the object header the http-response is built - CHttpServletResponse
In the json header the http-response is built
- AHttpServletResponse response
10Describe the utf8 encoding which is frequently used by http
- AThe encoding is variable-length and uses 8-bit code units. It was designed for backward compatibility with ASCII. UTF-8 encodes each of the 1,112,064[8] valid code points in Unicode using one to four 8-bit bytes
- BThe encoding is variable-length and uses 8-bit code units. It was designed for backward compatibility with XML. UTF-8 encodes each of the 1,112,064[8] valid code points in Unicode using one to four 8-bit bytes
11Describe the meaning of @consumes in JAX-RS
- AThe @Consumes annotation is used to specify which MIME media types of representations a resource can accept, or consume, from the client.
- BThe @Consumes annotation is used to specify which route of representations a resource can accept, or consume, from the client.
12Describe the meaning of @produces in JAX-RS
- AThe @Produces annotation is used to specify the XML representations a resource can produce and send back to the client.
- BThe @Produces annotation is used to specify the MIME media types or representations a resource can produce and send back to the client.
13For which purposes the one can use postman?
- APostman is a REST-client app under google chrome which can be used to test a REST-server
- BPostman is a JSON-client app under google chrome which can be used to test a REST-server
- CPostman is a XML-client app under google chrome which can be used to test a REST-server
- DPostman is a NODEJS-client app under google chrome which can be used to test a REST-server
14Give a description about Retrofit [in the context of Android]
- ARetrofit is a rest client framework for android.
- BRetrofit is a image handling framework for android.
- CRetrofit is a responsive framework for android.
15What is the function of the @SerialisedName annotation in Retrofit
- AThe parameter (value) of this annotation is the name to be used when serialising and deserialising objects. For example, the Java field _data is represented as RESPONSE_DATA_NAME in JSON.
public class PagedResponse<T> {
public PagingLinks _links;
@SerializedName(value="RESPONSE_DATA_NAME")
public List<T> _data;
} - B2
- AThe parameter (value) of this annotation is the name to be used when serialising and deserialising objects. For example, the Java field _data is represented as RESPONSE_DATA_NAME in JSON.
16Describe the difference between a synchronous API and an asynchronous API -call.
- ASynchronous API- call: call from client side blocks until a response from the receiver is obtained.
Asynchronous API-call: call from client side does not wait for a response from the server. - BSynchronous API- call: call from client side does not wait for a response from the server.
Asynchronous API-call: call from client side blocks until a response from the receiver is obtained.
- ASynchronous API- call: call from client side blocks until a response from the receiver is obtained.
Informações
- Descrição
- Quiz sobre REST and servlets, criado por Boy Achternaam em 29-01-2018.
- Autor
- Boy Achternaam
- Idioma
- English
- Visualizações
- 1
- Avaliação
- Ainda sem avaliações Avalie este quiz