G'day all,
I'm using CL_HTTP_CLIENT to interact with an external system which offers a URL based interface. This works fine until I have a parameter name with a space in it, at which point I get a "400 Bad HTTP request" response with the following detail:
Error: -21
Version: 7200
Component: HTTP_PLG
Date/Time: Mon May 14 13:40:28 2012
Module: http_plg.c Line: 5613
Server: SYDSVECCDEV_AED_00
Error Tag: {0003b201}
Detail: illegal request version
I'm creating the instance of CL_HTTP_CLIENT via method CREATE_BY_DESTINATION and then passing the rest of the URL by calling method REQUEST->SET_HEADER_FIELD passing name '~request_uri'.
When I pass something like the following it works fine:
?&action="create"&type="account - customer"&id="ACCOUNT926"&priority="12"
But when the parameter has a space such as 'accession number' below, it results in the 400 response.
?&action="create"&type="account - customer"&id="ACCOUNT926"&accession number="12"
I've tried manually replacing the space with %20.
I've tried using the 'IF_HTTP_CLIENT~ESCAPE_URL' method on the string.
I've tried to build the URL extension using method APPEND_FIELD_URL
In each case I get the 400 response.
Can anyone advise how I can successfully call such a URL or if there is just some limitation that means I can't use CL_HTTP_CLIENT in such a scenario??
I should also say that the URL with 'accession number' works fine when run directly in Internet Explorer.
Many thanks,
Mark
(please note I haven't posted on SCN / SDN very often - please shout if this question should be posted somewhere more specific)