Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Accept-Language for cl_http_client

dhorions
Contributor
0 Likes
1,089

I have written a program to load large pages into the icm-cache at certain times of the day.

I want to get the pages into the icm-cache for both 'nl' as 'en' language.

When I set the 'Accept-Language'-header however only an English version is stored in the cache. Users with a 'Dutch' browser still have to wait for the generation of the page.

<b>Is there another way to set the accept-language of the http client class?</b>

code :

<i>client->request->set_header_field( name = 'Accept-Language' value = '<b>nl</b>').

cl_http_utility=>set_request_uri( request = client->request uri = list_path ).

client->send( timeout = client->CO_TIMEOUT_INFINITE ).

client->receive( ).

client->response->get_status( IMPORTING code = subrc ).

RESP = CLIENT->RESPONSE.

RESP_STR = RESP->GET_CDATA( ).

client->close( ).</i>

Message was edited by: Dries Horions

Message was edited by: Dries Horions

Message was edited by: Dries Horions

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
558

Hi Dries,

You wrote an ABAP program to generate Web Page and store them in the ICM-Cahce, that's right ?

How do you generated the page, is it by calling a function module ?

Are you sure only the English version is store in the ICM.

When you define a web page in SE80 , you can set the language of your page as a parameter value sy-language.

Tell me more about your problem.

regards.

Bertrand

1 REPLY 1
Read only

Former Member
0 Likes
559

Hi Dries,

You wrote an ABAP program to generate Web Page and store them in the ICM-Cahce, that's right ?

How do you generated the page, is it by calling a function module ?

Are you sure only the English version is store in the ICM.

When you define a web page in SE80 , you can set the language of your page as a parameter value sy-language.

Tell me more about your problem.

regards.

Bertrand