<?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 Http post with parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536139#M1427212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We want to send an HTTP post with parameters,  and we are not sure how to do that.  We tried to do that like the code below,but we get the parameters in the body and not in the header ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA lo_client      TYPE REF TO  if_http_client.&lt;/P&gt;&lt;P&gt;  DATA lv_status_code TYPE i.&lt;/P&gt;&lt;P&gt;  DATA lv_reason      TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_http_client=&amp;gt;create_by_destination&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      destination  = 'ZRFC_TEST'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      client       = lo_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;request-&amp;gt;set_method( if_http_request=&amp;gt;co_request_method_post ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  cl_http_utility=&amp;gt;set_request_uri( request = lo_client-&amp;gt;request&lt;/P&gt;&lt;P&gt;                                    uri     = '?param1=value1' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;send( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;receive( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;response-&amp;gt;get_status( IMPORTING code   = lv_status_code&lt;/P&gt;&lt;P&gt;                                             reason = lv_reason ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuvia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Jan 2010 17:12:20 GMT</pubDate>
    <dc:creator>former_member182291</dc:creator>
    <dc:date>2010-01-10T17:12:20Z</dc:date>
    <item>
      <title>Http post with parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536139#M1427212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We want to send an HTTP post with parameters,  and we are not sure how to do that.  We tried to do that like the code below,but we get the parameters in the body and not in the header ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA lo_client      TYPE REF TO  if_http_client.&lt;/P&gt;&lt;P&gt;  DATA lv_status_code TYPE i.&lt;/P&gt;&lt;P&gt;  DATA lv_reason      TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_http_client=&amp;gt;create_by_destination&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      destination  = 'ZRFC_TEST'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      client       = lo_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;request-&amp;gt;set_method( if_http_request=&amp;gt;co_request_method_post ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  cl_http_utility=&amp;gt;set_request_uri( request = lo_client-&amp;gt;request&lt;/P&gt;&lt;P&gt;                                    uri     = '?param1=value1' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;send( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;receive( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_client-&amp;gt;response-&amp;gt;get_status( IMPORTING code   = lv_status_code&lt;/P&gt;&lt;P&gt;                                             reason = lv_reason ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuvia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jan 2010 17:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536139#M1427212</guid>
      <dc:creator>former_member182291</dc:creator>
      <dc:date>2010-01-10T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Http post with parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536140#M1427213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if I understand your issue but as you know you can set up GET parameters just by modifying URL and you should be able to modify post parameters by calling methods SET_FORM_FIELD and SET_FORM_FIELDS of request object. Similar as you set request method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2010 00:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536140#M1427213</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-01-11T00:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Http post with parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536141#M1427214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matrtin, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your helpful answer.  Your solution helps us to put the parameters in the body,  but we need a way to put the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters on the query, do you know of a way to do that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuvia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2010 09:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536141#M1427214</guid>
      <dc:creator>former_member182291</dc:creator>
      <dc:date>2010-01-11T09:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Http post with parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536142#M1427215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you mean by "parameters on the query". In any http request you can have two types of variables: POST or GET. The post variables are transferred in http header and you can add them using methods from my previous post. GET variables are transferred in URL. HTTP client has a method APPEND_FIELD_URL which can be used to add variable into URL string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2010 11:03:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/http-post-with-parameters/m-p/6536142#M1427215</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-01-11T11:03:49Z</dc:date>
    </item>
  </channel>
</rss>

