Http-post displays status = 200, but DOES NOT WRITE data into the server
Answers to your questions / Web Hosting / Http-post displays status...
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

Http-post displays status = 200, but DOES NOT WRITE data into the server

by
Gian_LuigiA
Created on 2023-08-23 15:26:25 (edited on 2024-09-04 14:24:10) in Web Hosting

Hello everyone,
My **domain name** is : https://www.arxis.fr
And I use **the offer** : Hébergement OVH (service "itbusiness2012")

I have the following problem :
I am writing my first app with Ionic/Angular/Typescript and I want read/write some data from/into a json file hosted by my OVH website ("https://www.arxis.fr/prova/people.json").

When I read data using the following statement:
_" return this.http.get(this.baseURL + 'people')"_
the XHR status code is = 200 and I receive all the records.

When I write data using the following statements:
_const httpOptions = { headers: new HttpHeaders({_
_'Content-Type': 'application/json; charset=utf-8'}) };_
_const body=person;_
_return this.http.post(this.baseURL + 'people', body, httpOptions)_
the status code returned is = 200, BUT NOTHING IS WRITTEN into the destination file.
WHY ??? I can't find an explanation...

For your information, please note that:
1. the .htaccess file gives the autorisation for all methods (GET, POST, PUT, DELETE, OPTIONS);
2. any manipulation into .ovconfig does not change the result.
Here you'll find the XHR screenshot:
!XHR200|404x500

I need your HELP !!! Thank you!
G.L. Aroasio (aroasio@arxis.fr)