N
N
nbnbdv2022-04-17 03:04:57
AJAX
nbnbdv, 2022-04-17 03:04:57

Why does the data from the server come with null?

When requests from the browser, instead of string values, null is returned,

625b597939d14305602766.jpeg

and if I send a request with curl, I get json with correct strings,

625b593867b22001029234.jpeg

Headers set ( Accept: '*/*', 'Content-Type': 'application/json' , 'Accept-Language': ' * ',)
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2022-04-17
@nbnbdv

The problem could be anything on the server side, but obviously not the headers themselves. Because you still get a json response.
Look towards the server code which parses these headers. Perhaps there is one logic for some headers, and another logic for other headers (containing errors compared to the first logic). Maybe there is the simplest protection against parsing, etc. In general, it is necessary to look at the server code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question