CHA PT ER
HTTP Client Requests and Header
Settings
This chapter contains the following sections:
• HTTP Client Requests
• HTTP Header Settings
–
HTTP Refresh Setting
–
MIME Type and Other HTTP Headers
–
Content Expiration Header Setting
• Identifying the Capabilities of IP Phone Clients
–
x-CiscoIPPhoneModelName
–
x-CiscoIPPhoneDisplay
–
x-CiscoIPPhoneSDKVersion
• Accept Header
5
HTTP Client Requests
The following procedure designates how HTTP client requests are handled:
• The Cisco IP Phone HTTP client performs an HTTP GET for a specified
URL.
• The HTPP server processes request and returns an XML object or plain text.
OL-5375-01
Cisco IP Phone Services Application Development Notes
5-61
HTTP Header Settings
• The phone processes the supported HTTP headers.
• The phone parses the XML object if ContentType is text/xml.
• The phone presents data and options to the user per the server response.
HTTP Header Settings
The following list provides definitions for HTTP header elements for
Cisco IP Phone services:
• “Refresh” (Time in Seconds, URL)
–
If no time is set or it is zero, the refresh gets set to manual.
–
If no URL is set, the current URL gets used.
See “HTTP Refresh Setting” for details.
• “ContentType” — The ContentType notifies the phone of the MIME type that
was sent. See the “MIME Type and Other HTTP Headers” section.
• “Expires” — Expires sets the Date/Time in GMT when the page is to expire.
Pages that have expired before being loaded do not get added to the URL
stack in the phone. The phone does not cache content. See “Content
Expiration Header Setting” for more information.
Chapter 5 HTTP Client Requests and Header Settings
HTTP Refresh Setting
The HTTP headers that are sent with any page from an HTTP server can include
a Refresh setting. This setting comprises two parameters: a time in seconds and a
URL. These two parameters direct the recipient to wait the time given in the
seconds parameter and then get the data to which the URL points.
The Cisco IP Phone HTTP client properly supports this setting, which gives a
great deal of power to service developers. It means that a new page can replace
any XML object that displays after a fixed time.
Figure 1 shows a good example of how to use the refresh setting. This sample
page shows the user the current value of Cisco stock.
1. A splash screen that displays the Yahoo logo.
Cisco IP Phone Services Application Development Notes
5-62
OL-5375-01
Chapter 5 HTTP Client Requests and Header Settings
2. After a very short time, it displays the numeric Cisco stock parameters.
3. Finally, it shows a graph of Cisco intraday stock performance. The display
then repeatedly cycles between the final two views.
Figure 1 Refresh Display Sample
HTTP Header Settings
OL-5375-01
Refreshing the display can occur without user intervention, because the display
automatically cycles if a timer parameter is specified. On any given screen,
however, the user can force an immediate reload by pressing the Update softkey.
Also, if a timer parameter of 0 was sent in the header, the page never automatically
reloads. In this case, the display will move to the next page only when the Update
softkey is pressed. If no refresh URL is specified, the current page gets reloaded.
Cisco IP Phone Services Application Development Notes
5-63