Bonjour
Je vous présente mon problème
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fetch('http://localhost:300/client', {
              headers : { 
                'Content-Type': 'application/json',
                'Accept': 'application/json'
               },
              method: 'POST',
              body:data
 
            })
 
 
            .then((response) => {
              console.log(response)
             response.text().then((data) =>{
 
              console.log(data)
              console.log(JSON.parse(data))
lorsque je suis en local host tout va bien je n'ai aucun problème
mais lorsque je le en production dans mon cpanel dans le dosser html, il me renvoi du html

comme réponse

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!doctype html>
 <html lang="en">
 
 <head>
   <meta charset="utf-8" />
   <link rel="icon" href="/favicon.ico" />
   <meta name="viewport" content="width=device-width,initial-scale=1" />
   <meta name="theme-color" content="#000000" />
   <meta name="description" content="Web site created using create-react-app" />
   <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
   <title>React App</title>
   <link href="/static/css/main.5ecd60fb.chunk.css" rel="stylesheet">
 </head>
 
 <body><noscript>You need to enable JavaScript to run this app.</noscript>
   <div id="root"></div>
   <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
   <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
   <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
   <link rel="stylesheet" href="css/connection.css">
   <link rel="stylesheet" href="css/prix.css">
   <script>
     ! function (i) {
       function e(e) {
         for (var r, t, n = e[0], o = e[1], u = e[2], f = 0, l = []; f < n.length; f++) t = n[f], Object.prototype.hasOwnProperty.call(p, t) && p[t] && l.push(p[t][0]), p[t] = 0;
         for (r in o) Object.prototype.hasOwnProperty.call(o, r) && (i[r] = o[r]);
         for (s && s(e); l.length;) l.shift()();
         return c.push.apply(c, u || []), a()
       }
 
       function a() {
         for (var e, r = 0; r < c.length; r++) {
           for (var t = c[r], n = !0, o = 1; o < t.length; o++) {
             var u = t[o];
             0 !== p[u] && (n = !1)
           }
           n && (c.splice(r--, 1), e = f(f.s = t[0]))
         }
         return e
       }
       var t = {},
         p = {
           1: 0
         },
         c = [];
 
       function f(e) {
         if (t[e]) return t[e].exports;
         var r = t[e] = {
           i: e,
           l: !1,
           exports: {}
         };
         return i[e].call(r.exports, r, r.exports, f), r.l = !0, r.exports
       }
       f.m = i, f.c = t, f.d = function (e, r, t) {
         f.o(e, r) || Object.defineProperty(e, r, {
           enumerable: !0,
           get: t
         })
       }, f.r = function (e) {
         "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
           value: "Module"
         }), Object.defineProperty(e, "__esModule", {
           value: !0
         })
       }, f.t = function (r, e) {
         if (1 & e && (r = f(r)), 8 & e) return r;
         if (4 & e && "object" == typeof r && r && r.__esModule) return r;
         var t = Object.create(null);
         if (f.r(t), Object.defineProperty(t, "default", {
             enumerable: !0,
             value: r
           }), 2 & e && "string" != typeof r)
           for (var n in r) f.d(t, n, function (e) {
             return r[e]
           }.bind(null, n));
         return t
       }, f.n = function (e) {
         var r = e && e.__esModule ? function () {
           return e.default
         } : function () {
           return e
         };
         return f.d(r, "a", r), r
       }, f.o = function (e, r) {
         return Object.prototype.hasOwnProperty.call(e, r)
       }, f.p = "/";
       var r = this["webpackJsonpfront-end"] = this["webpackJsonpfront-end"] || [],
         n = r.push.bind(r);
       r.push = e, r = r.slice();
       for (var o = 0; o < r.length; o++) e(r[o]);
       var s = n;
       a()
     }([])
   </script>
   <script src="/static/js/2.f0c5888a.chunk.js"></script>
   <script src="/static/js/main.1489022b.chunk.js"></script>
 </body>
</html>

perso je ne sais plus quoi faire