Resolve Reason: CORS header ‘Access-Control-Allow-Origin’ missing with PHP.

Resolve Reason: CORS header ‘Access-Control-Allow-Origin’ missing with PHP.

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If executing a call to our REST API returns an error message “Cross-origin request blocked: The same origin policy does not allow reading of remote resources” or “Reason: CORS header ‘Access-Control-Allow-Origin’ missing” or “(Reason: CORS request failed)”. Most likely, our server-side REST calls do not have the necessary headers to ... Read more

How to create a POST using RESTful API on PHP

Tiempo de lectura: < 1 minuto Reading Time: < 1 minutes Continuing from the previous post on How to create a GET using RESTful API on PHP, I’m going to show you how to create a POST and send JSON data using the body. Using RESTful API and the PHP programming language. First of all: Open your favorite code editor (Notepad++, ... Read more

How to Create a GET Request Using RESTful API in PHP

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes Many times, we need to fetch data from a remote server for our applications, and we have to consider creating a small backend to request that data. If you want to send data, I have provided a post where I explain how to generate a POST request with PHP: How … Read more