Products Technologies Demo Docs Blog Support Company

ReportingCloud Web API Supports Now Cross Origin Resource Sharing (CORS)

The ReportingCloud API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. You can learn more about the CORS W3C recommendation here: https://www.w3.org/TR/cors/ Traditionally, AJAX requests have been restricted by the Same Origin Policy that only allowed them to make request to resources within the same domain. Since HTML5, this restriction is gone and allows for AJAX requests to be made across domains. The following is a sample CURL request from a browser…

ReportingCloud Web API Supports Now Cross Origin Resource Sharing (CORS)

The ReportingCloud API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. You can learn more about the CORS W3C recommendation here:

https://www.w3.org/TR/cors/

Traditionally, AJAX requests have been restricted by the Same Origin Policy that only allowed them to make request to resources within the same domain. Since HTML5, this restriction is gone and allows for AJAX requests to be made across domains.

The following is a sample CURL request from a browser hitting http://example.com:

curl -u username:password -i https://api.reporting.cloud/v1/account/settings -H "Origin: http://example.com"
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
Access-Control-Allow-Origin: *
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 26 Sep 2016 15:45:38 GMT
Content-Length: 157

This enables client-side languages such as JavaScript or jQuery to make ReportingCloud Web API calls. With CORS supported by ReportingCloud, you can make AJAX requests like any other AJAX call. The following sample calls the Account/Settings endpoint using jQuery:

var serviceURL =
    "https://api.reporting.cloud/v1/account/settings";

$.ajax
({
    type: "GET",
    url: serviceURL,
    dataType: "json",
    async: false,
    cache: false,
    headers: {
        "Authorization": "Basic " + btoa("username:password")
    },
    success: function(response) {
        console.log(response);
}
});

Happy coding!

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ASP.NETASP.NET CoreConference

Back from KCDC 2025 - Some Impressions

In this blog post, we will share our impressions of the KCDC 2025 conference and our key takeaways from it. We showcased our latest features and collected valuable feedback from attendees.


ASP.NETASP.NET CoreConference

Text Control Sponsors and Exhibits at KCDC 2025 for the First Time

We are excited to announce that Text Control will be sponsoring and exhibiting at the Kansas City Developer Conference (KCDC) for the first time. This year's KCDC takes place August 13-16, 2025,…


ASP.NETASP.NET CoreConference

What a Week: Text Control at WeAreDevelopers World Congress 2025

Text Control attended the WeAreDevelopers World Congress 2025 in Berlin, where we showcased our latest innovations in document processing libraries. The event provided a valuable opportunity to…


ASP.NETASP.NET CoreConference

Hot Code, Hotter Weather: Developer World DWX 2025 in Mannheim

As a main sponsor and exhibitor, we had an incredible week at DWX 2025 in Mannheim. We showcased our latest document processing libraries, including our new Linux support, and hosted an…


ASP.NETConference

DWX Developer Week 2025: New City, New Venue - Same Great Experience

Join us at DWX Developer Week 2025 in Mannheim, Germany from June 30 to July 3, 2025. We will be showcasing our latest components for digital document processing. Visit our booth to learn how our…