<?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: Having issue to make a PROC HTTP Post request by passing a JSON message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667599#M199952</link>
    <description>I just learn how to use curl command today from SAS support and found the root cause. Sever side’s certificate expired. Your information is exactly the same I tried. Thank you!!!!</description>
    <pubDate>Wed, 08 Jul 2020 00:19:01 GMT</pubDate>
    <dc:creator>niejung</dc:creator>
    <dc:date>2020-07-08T00:19:01Z</dc:date>
    <item>
      <title>Having issue to make a PROC HTTP Post request by passing a JSON message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667525#M199908</link>
      <description>&lt;P&gt;I need help!&amp;nbsp; I had been trying to make a PROC HTTP POST request by passing a JSON message and kept getting 503 service unavailable.&amp;nbsp; I did the POST request call in postman and worked successfully and data was returned.&amp;nbsp; &amp;nbsp; I am running in 9.4m3 SAS linux env.&lt;/P&gt;&lt;P&gt;It is using &lt;U&gt;basic authentication&lt;/U&gt; to pass security for URL.&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;url="&lt;A href="https://cash-fulfillment-api-sit01.ext-sit.ocp.paasfhlmcnp.com/api/pricing/cash/v1.0/cashWindowAccounting" target="_blank"&gt;https://cash-fulfillment-api-sit01.ext-sit.ocp.paasfhlmcnp.com/api/pricing/cash/v1.0/cashWindowAccounting&lt;/A&gt;" &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;json_in file format is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;{
  "PricingRequestMetaData": {
    "CorrelationIdentifier": "949cf51d-3689-4d51-966f-8a193fd1487c",
    "RequestTime": "06/18/2020 09:10:10",
    "PricingRequestUserId": "f254202"
  },
  "PricingRequestPayload": {
    "SifmaSettlementDate": "2020-07-27",
    "PriceAsOfDateTime": "2020-05-31 11:59:59",
    "PricingRequestItems": [
      {
        "BenchmarkSecurityProduct": "FHLMC ARM CMS 3/1 2/2/5"
      }
    ]
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Program Code&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename json_in "/fmac/dev/cor/cwa/src/ctrl_arm_setting.json";
filename out TEMP;

proc http   
   url="https://cash-fulfillment-api-sit01.ext-sit.ocp.paasfhlmcnp.com/api/pricing/cash/v1.0/cashWindowAccounting" 
   method="POST"
   webusername="xxxxxxxx"
   webpassword="xxxxxxxx"
   in=json_in
   out=out;
run;

data _null_;
   file in; 
   input;
   put _infile_;
   datalines;
   {"name":"value"}
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667525#M199908</guid>
      <dc:creator>niejung</dc:creator>
      <dc:date>2020-07-07T17:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue to make a PROC HTTP Post request by passing a JSON message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667544#M199919</link>
      <description>&lt;P&gt;can you try the following and see if you are able to access the url&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="default prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;curl &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;v &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;H &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"Content-Type: application/json"&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;X POST &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;--&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;data &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;@params&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;json &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;u your_username&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;your_password &amp;lt;url&amp;gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jul 2020 19:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667544#M199919</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-07-07T19:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue to make a PROC HTTP Post request by passing a JSON message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667599#M199952</link>
      <description>I just learn how to use curl command today from SAS support and found the root cause. Sever side’s certificate expired. Your information is exactly the same I tried. Thank you!!!!</description>
      <pubDate>Wed, 08 Jul 2020 00:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Having-issue-to-make-a-PROC-HTTP-Post-request-by-passing-a-JSON/m-p/667599#M199952</guid>
      <dc:creator>niejung</dc:creator>
      <dc:date>2020-07-08T00:19:01Z</dc:date>
    </item>
  </channel>
</rss>

