<?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>Question Re: passing URL parameters using CL_HTTP_CLIENT for POST Method in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715382#M196957</link>
    <description>&lt;P&gt;Hello Vamshi,&lt;/P&gt;&lt;P&gt;i am struck with this similar issue of passing From and To dates as parameters in HTTPS POST method call. In postman, it works fine. Any solution you got?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naresh J &lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 12:25:34 GMT</pubDate>
    <dc:creator>former_member353872</dc:creator>
    <dc:date>2020-11-04T12:25:34Z</dc:date>
    <item>
      <title>passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaq-p/715377</link>
      <description>&lt;P&gt;I have to query an external URL to fetch some data that we have to use in our system.&lt;/P&gt;
  &lt;P&gt;Now recently the API was changed from GET to that of POST.&lt;/P&gt;
  &lt;P&gt;Earlier we had maintained the URL parameters directly in the RFC and were able to generate a successful response.&lt;/P&gt;
  &lt;P&gt;But now since the change in the API when i change the request method to post the QUERY parameters are not being passed to the Service.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;For example if i my URL is "XXXX.XXXX.net/v1/oauth2/tokens?grant_type=client-credentials" the service only gets XXXX.XXXX.net/v1/oauth2/tokens. the Query parameters are being truncated by the post request.&lt;/P&gt;
  &lt;P&gt;I already checked the options in the Post&lt;/P&gt;
  &lt;P&gt; &lt;A href="https://archive.sap.com/discussions/thread/3437183" target="test_blank"&gt;https://archive.sap.com/discussions/thread/3437183&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Any other way forward? to make it work the way it was for the GET Method?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 10:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaq-p/715377</guid>
      <dc:creator>vamsixk</dc:creator>
      <dc:date>2018-10-09T10:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715378#M196953</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenicf_post_service_abexa.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenicf_post_service_abexa.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 10:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715378#M196953</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-10-09T10:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715379#M196954</link>
      <description>&lt;P&gt;HI Horst,&lt;/P&gt;&lt;P&gt;Thank you for your quick reply.&lt;/P&gt;&lt;P&gt;This is an external service non-SAP that is being called via an RFC(Type G), which uses basic authentication via Client Credentials.&lt;/P&gt;&lt;P&gt;We have to provide a username and password for authenticating. And on top of that this is an outgoing HTTPS request. which we are instantiating based on the RFC destination that we have configured.&lt;/P&gt;&lt;P&gt;In the example we are just calling a service and displaying it. But we want to call an external service and process the response and use it in further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short is there a way to pass QUERY parameters using the class CL_HTTP_CLIENT. I know that we can pass Header parameters and form parameters via SET_HEADER_FIELD and SET_FORM_FIELD methods. But this external service uses query parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how it looks on postman &lt;A href="https://answers.sap.com/storage/temp/230594-postman-query-params.png"&gt;postman-query-params.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The text highlighted in yellow are the query parameters. and are not considered as Header parameters or Form parameters.&lt;/P&gt;&lt;P&gt;awaiting your valuable feedback.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Vamsi&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 04:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715379#M196954</guid>
      <dc:creator>vamsixk</dc:creator>
      <dc:date>2018-10-10T04:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715380#M196955</link>
      <description>&lt;P&gt;How do I solve it?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 19:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715380#M196955</guid>
      <dc:creator>PChacon</dc:creator>
      <dc:date>2020-01-21T19:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715381#M196956</link>
      <description>&lt;P&gt;The URL parameters can be passed in 2 ways. The below code will give you exactly what you want (as per your postman screenshot). &lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;lo_http_client-&amp;gt;append_field_url(&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 name = 'fieldname' " Field Name&lt;BR /&gt;
 value = 'fieldvalue' " Field Value&lt;BR /&gt;
 CHANGING&lt;BR /&gt;
 url = 'lv_url' " URL to which to append the field&lt;BR /&gt;
 ).&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;P&gt;lo_http_client-&amp;gt;request-&amp;gt;set_form_field(&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 name = 'fieldname' " Name of form field&lt;BR /&gt;
 value = 'fieldvalue' " Form field value&lt;BR /&gt;
 ).&lt;BR /&gt;
&lt;BR /&gt;
 cl_http_utility=&amp;gt;set_request_uri( request = lo_http_client-&amp;gt;request&lt;BR /&gt;
 uri = lv_url ).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 09:31:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715381#M196956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-02-04T09:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: passing URL parameters using CL_HTTP_CLIENT for POST Method</title>
      <link>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715382#M196957</link>
      <description>&lt;P&gt;Hello Vamshi,&lt;/P&gt;&lt;P&gt;i am struck with this similar issue of passing From and To dates as parameters in HTTPS POST method call. In postman, it works fine. Any solution you got?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naresh J &lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 12:25:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passing-url-parameters-using-cl-http-client-for-post-method/qaa-p/715382#M196957</guid>
      <dc:creator>former_member353872</dc:creator>
      <dc:date>2020-11-04T12:25:34Z</dc:date>
    </item>
  </channel>
</rss>

