<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CL_HTTP_CLIENT 400 Bad HTTP Request - Parameter with Space ' ' in name in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697574#M1670561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;G'day all,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Error: -21 &lt;/DIV&gt;&lt;DIV&gt;Version: 7200 &lt;/DIV&gt;&lt;DIV&gt;Component: HTTP_PLG &lt;/DIV&gt;&lt;DIV&gt;Date/Time: Mon May 14 13:40:28 2012 &lt;/DIV&gt;&lt;DIV&gt;Module: http_plg.c Line: 5613 &lt;/DIV&gt;&lt;DIV&gt;Server: SYDSVECCDEV_AED_00 &lt;/DIV&gt;&lt;DIV&gt;Error Tag: {0003b201} &lt;/DIV&gt;&lt;DIV&gt;Detail: illegal request version&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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-&amp;gt;SET_HEADER_FIELD passing name '~request_uri'. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;When I pass something like the following it works fine:&lt;/DIV&gt;&lt;DIV&gt;?&amp;amp;action="create"&amp;amp;type="account - customer"&amp;amp;id="ACCOUNT926"&amp;amp;priority="12"&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;But when the parameter has a space such as 'accession number' below, it results in the 400 response.&lt;/DIV&gt;&lt;DIV&gt;?&amp;amp;action="create"&amp;amp;type="account - customer"&amp;amp;id="ACCOUNT926"&amp;amp;accession number="12"&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I've tried manually replacing the space with %20.&lt;/DIV&gt;&lt;DIV&gt;I've tried using the 'IF_HTTP_CLIENT~ESCAPE_URL' method on the string.&lt;/DIV&gt;&lt;DIV&gt;I've tried to build the URL extension using method APPEND_FIELD_URL&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;In each case I get the 400 response. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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??&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I should also say that the URL with 'accession number' works fine when run directly in Internet Explorer. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Many thanks,&lt;/DIV&gt;&lt;DIV&gt;Mark&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;(please note I haven't posted on SCN / SDN very often - please shout if this question should be posted somewhere more specific)&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2012 03:57:32 GMT</pubDate>
    <dc:creator>Pyc</dc:creator>
    <dc:date>2012-05-14T03:57:32Z</dc:date>
    <item>
      <title>CL_HTTP_CLIENT 400 Bad HTTP Request - Parameter with Space ' ' in name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697574#M1670561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;G'day all,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Error: -21 &lt;/DIV&gt;&lt;DIV&gt;Version: 7200 &lt;/DIV&gt;&lt;DIV&gt;Component: HTTP_PLG &lt;/DIV&gt;&lt;DIV&gt;Date/Time: Mon May 14 13:40:28 2012 &lt;/DIV&gt;&lt;DIV&gt;Module: http_plg.c Line: 5613 &lt;/DIV&gt;&lt;DIV&gt;Server: SYDSVECCDEV_AED_00 &lt;/DIV&gt;&lt;DIV&gt;Error Tag: {0003b201} &lt;/DIV&gt;&lt;DIV&gt;Detail: illegal request version&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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-&amp;gt;SET_HEADER_FIELD passing name '~request_uri'. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;When I pass something like the following it works fine:&lt;/DIV&gt;&lt;DIV&gt;?&amp;amp;action="create"&amp;amp;type="account - customer"&amp;amp;id="ACCOUNT926"&amp;amp;priority="12"&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;But when the parameter has a space such as 'accession number' below, it results in the 400 response.&lt;/DIV&gt;&lt;DIV&gt;?&amp;amp;action="create"&amp;amp;type="account - customer"&amp;amp;id="ACCOUNT926"&amp;amp;accession number="12"&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I've tried manually replacing the space with %20.&lt;/DIV&gt;&lt;DIV&gt;I've tried using the 'IF_HTTP_CLIENT~ESCAPE_URL' method on the string.&lt;/DIV&gt;&lt;DIV&gt;I've tried to build the URL extension using method APPEND_FIELD_URL&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;In each case I get the 400 response. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;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??&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I should also say that the URL with 'accession number' works fine when run directly in Internet Explorer. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Many thanks,&lt;/DIV&gt;&lt;DIV&gt;Mark&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;(please note I haven't posted on SCN / SDN very often - please shout if this question should be posted somewhere more specific)&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 03:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697574#M1670561</guid>
      <dc:creator>Pyc</dc:creator>
      <dc:date>2012-05-14T03:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: CL_HTTP_CLIENT 400 Bad HTTP Request - Parameter with Space ' ' in name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697575#M1670562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try replacing the space with a '+' sign?&lt;/P&gt;&lt;P&gt;Or you can do the easy thing, by removing the space &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon" src="https://community.sap.com/745/images/tiny_mce3/plugins/jiveemoticons/images/spacer.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 04:31:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697575#M1670562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-14T04:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: CL_HTTP_CLIENT 400 Bad HTTP Request - Parameter with Space ' ' in name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697576#M1670563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Shambu! The '+' replacement worked a charm &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 04:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697576#M1670563</guid>
      <dc:creator>Pyc</dc:creator>
      <dc:date>2012-05-14T04:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: CL_HTTP_CLIENT 400 Bad HTTP Request - Parameter with Space ' ' in name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697577#M1670564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 04:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-http-client-400-bad-http-request-parameter-with-space-in-name/m-p/8697577#M1670564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-14T04:53:09Z</dc:date>
    </item>
  </channel>
</rss>

