REST-101 Flashcards
Which is the default factory to create the RestTemplate?
ClientHttpRequestFactory
What is GingerBread?
It is Google API for RTemp
Does RTemp supports GZIP Compression trxn
Yes
What is Google GSON
It is a Object to JSON marshalling
What is required for RTemp construction?
A MessageConvertor and a factory, Offcourse both choice has defaults set
What is the default Exception Handler ?
RestClientException
Does all HTTP methods throws REstClientException?
Yes
How do RTemp supports the GZIP compression?
By adding Accept-Encoding in the headers
For all HTTP methoda what are the general return types?
T, ResponseEntity, URI,
Just say the different Methid types?
GET, PUT, POST, OPTIONS, HEAD, POST
Why we require HttpMessageConverter
The Object are to and from converted to HTTPRequest to HTTPResponse
Say the methods of HttpMessageConverter?
boolean canRead(Class> clazz , Mediatype type) boolean canWrite(Class> clazz, MediaType type) List getSupportedMediaTypes() T read(Class> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException
T write(Class> clazz, HttpOutputMessage ouptputMessage) throws IOException, HttpMessageNotWritableException
How can you register your own MessageConverter?
By using messageconverters prop
Name the main MessageCoverters type?
ByteArrayHttpMessageConverter StringHttpMessageConverter ResourceHttpMessageConverter XmlAwareFormHttpMessageConverter FormHttpMessageConverter SimpleXmlHttpMessageConverter MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter
Does by default all messagecoverters available?
Nope, by default, ByteArray,String & ResourceHttpMessageCoverter is available