<?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 Re: How do I get a cookie from a HTTP Post using the HTTP_CLIENT class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-a-cookie-from-a-http-post-using-the-http-client-class/m-p/3710290#M893259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you found an example? I'm trying to do the same, but have not found anything useful.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2008 18:21:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-28T18:21:00Z</dc:date>
    <item>
      <title>How do I get a cookie from a HTTP Post using the HTTP_CLIENT class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-a-cookie-from-a-http-post-using-the-http-client-class/m-p/3710289#M893258</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;Can anyone provide me some sample code of how to successfully get a list of cookies from a HTTP POST and send a list of cookies to an HTTP get. My code below does not seem to work. I know the URL I am posting to returns some cookies and the subsequent HTTP GET requires these cookies. I really don't need to know the names or the values of the cookies, I just need to be able to send them via the HTTP GET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Code Example&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: client type ref to if_http_client,&lt;/P&gt;&lt;P&gt;      xml_string type string,&lt;/P&gt;&lt;P&gt;      xml_response type ref to cl_xml_document,&lt;/P&gt;&lt;P&gt;      zsubrc type sy-subrc.&lt;/P&gt;&lt;P&gt;data: cookies type TIHTTPCKI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_http_client=&amp;gt;create_by_url( exporting url = url importing client = client exceptions others = 1 ).&lt;/P&gt;&lt;P&gt;CLIENT-&amp;gt;PROPERTYTYPE_ACCEPT_COOKIE =  1.&lt;/P&gt;&lt;P&gt;client-&amp;gt;request-&amp;gt;set_header_field( exporting name = '~request_method' value = 'POST' ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;request-&amp;gt;set_header_field( exporting name = '~server_protocol' value = 'HTTP/1.1' ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;request-&amp;gt;set_header_field( exporting name = 'Content-Type' value = 'text/xml' ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;request-&amp;gt;set_data( exporting data = xml_xstring_in offset = 0 ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;send( exceptions http_communication_failure = 1 http_invalid_state = 2 ).&lt;/P&gt;&lt;P&gt;CLIENT-&amp;gt;request-&amp;gt;RECEIVE_COOKIE.&lt;/P&gt;&lt;P&gt;client-&amp;gt;receive( exceptions http_communication_failure = 1 http_invalid_state = 2 http_processing_failed = 3 ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;request-&amp;gt;GET_COOKIES( changing cookies = cookies ).&lt;/P&gt;&lt;P&gt;xml_xstring_out = client-&amp;gt;response-&amp;gt;get_data( ).&lt;/P&gt;&lt;P&gt;client-&amp;gt;close( ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 22:50:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-a-cookie-from-a-http-post-using-the-http-client-class/m-p/3710289#M893258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T22:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a cookie from a HTTP Post using the HTTP_CLIENT class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-a-cookie-from-a-http-post-using-the-http-client-class/m-p/3710290#M893259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you found an example? I'm trying to do the same, but have not found anything useful.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 18:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-get-a-cookie-from-a-http-post-using-the-http-client-class/m-p/3710290#M893259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T18:21:00Z</dc:date>
    </item>
  </channel>
</rss>

