Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

if_http_client disable cookie urlencoding

Hello

I am trying to send a http request with a cookie inside. But the cookie in the http header is urlencoded and our partner can not handle urlencoded cookies. How i can disable this encoding?

Example:

...

CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL

EXPORTING

URL = url

IMPORTING

CLIENT = http_client

CALL METHOD http_client->request->set_cookie

EXPORTING

name = 'JSESSIONID'

value = 'BFE22320B835B3BC19B2F17D52727A89.web202-jvm01'.

http_client->send( ).

-> HTTP Request <-

...

POST /myrequest/xmlSimpleLogin?agencyNumber=123

cookie: JSESSIONID=BFE17D52727A89%2eweb202-jvm01

content-type: text/html; charset=iso-8859-1

content-length: 4

...

you see the '.' is replaced with '%2e'.

Thanks

Ilan Stark

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question