CORS
Definition
Cross-Origin Resource Sharing — a security mechanism that controls which domains can make requests to your server. Browsers block cross-origin requests by default; servers must include `Access-Control-Allow-Origin` headers to permit them.
Code Example
Learn More
Related Terms
Application Programming Interface — a set of rules and endpoints that allow different software systems to communicate. Web APIs typically use HTTP methods (GET, POST, PUT, DELETE) to exchange data in JSON format.
FetchThe modern browser API for making HTTP requests. fetch() returns a Promise that resolves to the Response object. It replaces the older XMLHttpRequest (XHR) and works with async/await.
HTTP MethodsStandard request methods that indicate the desired action on a resource. GET retrieves data, POST creates, PUT/PATCH updates, DELETE removes. Each method has semantics about safety and idempotency.