Express the format of request and response message format. What is the role of adapter class in database connection?

 The format of request and response message format is:- 


HTTP

HTTP specifications concisely define messages as "requests from client to server and responses from server to client." At its most elemental level, the role of ASP.NET is to enable server-based applications to handle HTTP messages. The primary way it does this is through HttpRequest and HttpResponse classes. The request class contains the HTTP values sent by a client during a Web request; the response class contains the values returned to the client.



HTTP Request Message Format

  • The Request-Line consists of three parts: the method token, the Request-URI, and the protocol version. Several methods are available, the most common being the POST and GET methods. The Uniform Resource Identifier (URI) specifies the resource being requested. This most commonly takes the form of a Uniform Resource Locator (URL) but can be a file or other resource. The protocol version closes out the Request-Line.
  •  The general-header is used to pass fields that apply to both requests and responses. The most important of these is the cache-control field that specifies, among other things, what can be cached and how long it can be cached.
  • The request header is used by the client to pass additional information about the request, as well as the client. Most of the HttpRequest object's properties correspond to values in this header.


HTTP Response Message Format

  • The server responds with a status line that includes the message's protocol version, success or error code, and a textual description of the error code. This is followed by the general header and the response header that provides information about the server. The entity-header provides metainformation about the body contents or the resource requested.

                                                 OR,

The Citrix ADC appliance does not check for the validity of the HTTP callout request. Therefore, before you configure HTTP callouts, you must know the format of an HTTP request. You must also know the format of an HTTP response because configuring an HTTP callout involves configuring expressions that evaluate the response from the HTTP callout agent.


This section includes the following sections:

  • Format of an HTTP Request
  • Format of an HTTP Response

Format of an HTTP Request

  • An HTTP request contains a series of lines that each end with a carriage return and a line feed, represented as either <CR><LF> or \r\n.
  • The first line of a request (the message line ) contains the HTTP method and target. For example, a message line for a GET request contains the keyword GET and a string that represents the object that is to be fetched, as shown in the following example:

Syntax

GET /mysite/mydirectory/index.html HTTP/1.1\r\n

The rest of the request contains HTTP headers, including a required Host header and, if applicable, a message body.

The request ends with a bank line (an extra <CR><LF> or \r\n).


Following is an example of a request:

Get /mysite/index.html HTTP/1.1\r\n

Host: 10.101.101.10\r\n

Accept: */*\r\n

\r\n



Format of an HTTP Response

An HTTP response contains a status message, response HTTP headers, and the requested object or, if the requested object cannot be served, an error message.


Following is an example of a response:

HTTP/1.1 200 OK\r\n

Content-Length: 55\r\n

Content-Type: text/html\r\n

Last-Modified: Wed, 12 Aug 1998 15:03:50 GMT\r\n

Accept-Ranges: bytes\r\n

ETag: “04f97692cbd1:377”\r\n

Date: Thu, 19 Jun 2008 19:29:07 GMT\r\n

\r\n

<55-character response>


Role of adapter class in database connection

  • The DataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data. 
  • The DataAdapter provides this bridge by mapping Fill, which changes the data in the DataSet to match the data in the data source, and Update, which changes the data in the data source to match the data in the DataSet.

Comments

Popular posts from this blog

Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

Suppose that a data warehouse consists of the three dimensions time, doctor, and patient, and the two measures count and charge, where a charge is the fee that a doctor charges a patient for a visit. a) Draw a schema diagram for the above data warehouse using one of the schemas. [star, snowflake, fact constellation] b) Starting with the base cuboid [day, doctor, patient], what specific OLAP operations should be performed in order to list the total fee collected by each doctor in 2004? c) To obtain the same list, write an SQL query assuming the data are stored in a relational database with the schema fee (day, month, year, doctor, hospital, patient, count, charge)

Discuss classification or taxonomy of virtualization at different levels.