My fetch request doesn't send the values to my script file using GET (CROS Origin alrea
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

My fetch request doesn't send the values to my script file using GET (CROS Origin alrea

by
Community Deleted user
Created on 2021-08-18 14:38:10 (edited on 2024-09-04 13:57:30) in Hébergements Web

I've got an issue using this fetch request (which I used around 75 times all accross my website and I never had this issue before)

When sending my values in my URL using get with Fetch(), I can see that no values are returned in my script using the console.log(answer) as shown under this message

Here are things I've tried to solve and debug this issue :

- console.log the answers to this requests as you can see in the picture.
- checked that response was ok, which it is, which means that fetch find the script location and the script itself
- put console.log in the entire process from the start to the end at every step of it, and everything works fine. The only issue is that my script doesn't receive the values sent from my fetch request

- I've set in my .htaccess the right parameters to allow the CROS policy

- From the screen you'll at the bottom of this post, CROS are set ON correctly but still, my two values id_user and statut don't want to send themselves even though they are transfered

Any help would be welcome! thanks :slight_smile:

NB : This code works for 75+ other places in my website and runs also perfectly in localhost

image

and when it comes to the php script :

image

[1]: https://i.stack.imgur.com/LIe4N.png
[2]: https://i.stack.imgur.com/N867b.png