PrepAway - Latest Free Exam Questions & Answers

You need to develop the application to meet the requirements

HOTSPOT
You are developing a web application that retrievesdata from a web service.
The data being retrieved is a custom binary datatype named bint. The data can also be represented in XML.
Two existing methods named parseXml() and parseBint() are defined on the page.
The application must:
Retrieve and parse data from the web service using binary format if possible
Retrieve and parse the data from the web service using XML when binary format is not possible
You need to develop the application to meet the requirements.
What should you do? (To answer, select the appropriate options from the drop-down lists in the answer area.)

A.

Explanation:

6 Comments on “You need to develop the application to meet the requirements

  1. David says:

    Accepts:
    A set of key/value pairs that map a given dataType to its MIME type.
    while

    DataType: The type of data that you’re expecting back from the server, and it is a string.

    I think Datatype is the right answer




    0



    0
  2. Rocker says:

    Accept allows to set key-value pair response data, dataType is also for response data but a short hand such as “json” but it’s equvivalent accept header would be “text/json”.
    Content-Type is for Request data.
    In 1st dropdown, accepts:’application/bint,text/xml’
    In 2nc dropdown, if(request.getResponseHeader…




    0



    0

Leave a Reply