Copy link to clipboard
Copied
Hey there,
I'm playing around with CF locally with a Reac Front End, for speed of testing I'm using the built in webserver to see whether it's work keeping legacy CF components for a REST API.
I can get the GET and POST methods to work but am getting a CORS issue with DELETE.
I've tried including the following inside my Rest service but still no luck.
Thanks guys for the reply.
I managed to get it working by setting up Apache, and running the connector, creating and signing my own cert for MacOS and then adding in the correct headers inside my virtual directory.
Bit of a stuff around by everything works as it should
Cheers
Copy link to clipboard
Copied
Could you please tell us what the issue is?
What do you do? What do you get as a result? Please share the relevant code and error messages.
Copy link to clipboard
Copied
In any case, you can simply use the OPTIONS request to ask the API whether it allows DELETE. Something like:
<cfhttp url="https://reqres.in/api/users" method="options">
<cfhttpparam type="header" name="Access-Control-Request-Methods" value="DELETE" >
</cfhttp>
<cfdump var="#cfhttp#" >
Copy link to clipboard
Copied
Thanks guys for the reply.
I managed to get it working by setting up Apache, and running the connector, creating and signing my own cert for MacOS and then adding in the correct headers inside my virtual directory.
Bit of a stuff around by everything works as it should
Cheers
Copy link to clipboard
Copied
Thanks for sharing that.