CORS Request with Credentials

An example of sending a CORS request with an Origin header and an authorization cookie. In this CORS Request with Credentials example, the Origin is provided with "Origin:" request header, and the cookie is provided with the "Cookie: authCookie=my_auth_cookie" header.
CORS Request with Credentials Send
GET /echo/get/json HTTP/1.1
Cookie: authCookie=my_auth_cookie

Updated: Viewed: 7350 times

CORS Requests

CORS is a mechanism that provides secure communication between browsers and servers running on different origins.

CORS allows a web application running on to securely access restricted resources on

CORS is a way for the server to check if the request is coming from an allowed origin.

What is CORS?

Cross-Origin Resource Sharing (CORS) is an HTTP header-based mechanism that enables secure communication between browsers and servers running from different sources. These sources can differ from the current ones by hostname, HTTP scheme, or port number. A feature of CORS implementation was related to the restrictions of the single-origin policy, which restricts resources to interact only with resources located in the same domain. CORS is a way that a server can check if a request is coming from an allowed source and tell the browser not to block it. To make CORS requests using Curl, you need to provide an Origin header for your requests.

Curl CORS Example
curl -H "Origin:"

Generate Code Snippets for CORS Request Credentials Example

Convert your CORS Request Credentials request to the PHP, JavaScript/AJAX, Curl/Bash, Python, Java, C#/.NET code snippets using the ReqBin code generator.