<?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: Error in Fetching API through SAP UI5 - CORS Error -... in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaa-p/14198636#M4924508</link>
    <description>In Server they added my URL but i still face this issue</description>
    <pubDate>Fri, 29 Aug 2025 06:55:52 GMT</pubDate>
    <dc:creator>Akash_Kanyadhara</dc:creator>
    <dc:date>2025-08-29T06:55:52Z</dc:date>
    <item>
      <title>Error in Fetching API through SAP UI5 - CORS Error - preflightmissingalloworiginheader</title>
      <link>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaq-p/14185489</link>
      <description>&lt;LI-CODE lang="javascript"&gt;onUpdateCaseDetails: function () {
            var sIncidentType1 = "Akash123";
            var sCaseID = "UHEALTH-INVESTIG-WORK I-61005";
            var sActionID = "pyUpdateCaseDetails";
            var sUrl = "https://leaseplan01.pegalabs.io/prweb/api/application/v2/cases/" +
                encodeURIComponent(sCaseID) +
                "/actions/" +
                encodeURIComponent(sActionID) +
                "?viewType=form";

            var sBearerToken = "XXXXXXXXX"; // your full token

            var oPayload = {
                content: {
                    IncidentType: sIncidentType1
                }
            };

            $.ajax({
                url: sUrl,
                method: "PATCH",
                contentType: "application/json",
                data: JSON.stringify(oPayload),
                headers: {
                    "Authorization": "Bearer " + sBearerToken,
                    "If-Match": "20250820T072129.183 GMT",
                    "x-origin-channel": "Web",
                    "Content-Type": "application/json",
                    "Accept": "application/json"
                    // "Access-Control-Allow-Origin" :"*"
                },
                success: function (oResponse) {
                    MessageToast.show("Case updated successfully!");
                    console.log("Update response:", oResponse);
                },
                error: function (oError) {
                    MessageToast.show("Update failed: " + oError.statusText);
                    console.error("Update error:", oError);
                }
            });
        },&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Aug 2025 04:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaq-p/14185489</guid>
      <dc:creator>Akash_Kanyadhara</dc:creator>
      <dc:date>2025-08-21T04:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Fetching API through SAP UI5 - CORS Error -...</title>
      <link>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaa-p/14185665#M4923520</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1975019"&gt;@Akash_Kanyadhara&lt;/a&gt;&amp;nbsp; i think&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;This is a CORS issue. The browser sends a preflight &lt;/SPAN&gt;OPTIONS&lt;SPAN&gt; request for your &lt;/SPAN&gt;PATCH&lt;SPAN&gt; with custom headers, and the API response does not include the required CORS headers. You cannot fix this in UI5 code alone. You must either enable CORS on the API or call it through a proxy on BTP.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 19:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaa-p/14185665#M4923520</guid>
      <dc:creator>Marla-Ellinger</dc:creator>
      <dc:date>2025-08-20T19:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Fetching API through SAP UI5 - CORS Error -...</title>
      <link>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaa-p/14198636#M4924508</link>
      <description>In Server they added my URL but i still face this issue</description>
      <pubDate>Fri, 29 Aug 2025 06:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-in-fetching-api-through-sap-ui5-cors-error/qaa-p/14198636#M4924508</guid>
      <dc:creator>Akash_Kanyadhara</dc:creator>
      <dc:date>2025-08-29T06:55:52Z</dc:date>
    </item>
  </channel>
</rss>

