Entering content frame

Function documentation GET_ACCEPT Method Locate the document in its SAP Library structure

Use

The GET_ACCEPT method returns a value that is equivalent to the value of the HTTP request header ACCEPT. This header is sent to the Web server by a device in an HTTP request and contains the complete information about the MIME Types (or Content types) that the browser can process.

The following list contains MIME types that a browser can pass in a request:

MIME Type

Description

File Extension

text/html

HTML file

html, htm

text/css

CSS style sheet file

css

text/javascript

JavaScript file

js

image/gif

GIF graphics

gif

image/jpeg

JPEG graphics

jpeg, jpg, jpe

application/msword

Microsoft Word files

doc, dot

 

The MIME types based on WAP include:

MIME Type

Description

File Extension

text/vnd.wap.wml

WML source code

wml

application/vnd.wap.wmlc

Compiled WML

wmlc

text/vnd.wap.wmlsrcipt

WMLScript

wmlscript

text/vnd.wap.wmlscript

WMLScript

wsc

application/vnd.wap.wmlscriptc

Compiled WMLScript

wmlsc

application/vnd.wap.wmlscriptc

Compiled WMLScript

wsc

image/vnd.wap.wbmp

Wireless bitmap

wbmp

 

Example

<%@page language="abap"%>
<%--
The ACCEPT attribute is equivalent to the HTTP request-header „ACCEPT".
The USER_AGENT attribute is equivalent to the HTTP request-header „USER-AGENT".
--%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
<card id="main" title="Header">
<p>
<a href="#accept">ACCEPT</a><br/>
<a href="#ua">USERAGENT</a><br/>
</p>
</card>

<card id="accept" title="accept">
<do type="prev"><prev/></do>
<p>
<%= client_info->get_accept( ) %>
</p>
</card>

<card id="ua" title="User Agent">
<do type="prev"><prev/></do>
<p>
<%= client_info->get_user_agent( ) %>
</p>
</card>

</wml>

Interface IF_CLIENT_INFO

Leaving content frame