A
A
Alexey Konovalov2018-02-19 08:51:04
JavaScript
Alexey Konovalov, 2018-02-19 08:51:04

Why does a 415 error appear when submitting via $.post?

Hello! Not so long ago, for no reason, an error began to appear: 415 Unsupported Media Type
if a request to the server is sent like this:

$.post('/ajax/load', {act: act}, function(d){
   //....
});


But you just need to change $.post to $.get - everything is fine. Data on the server is received via $_REQUEST. Previously, everything worked perfectly, nothing was done with the code.
Tell me where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sklyarov, 2018-02-19
@0example

https://developer.mozilla.org/ru/docs/Web/HTTP/Sta...
https://stackoverflow.com/questions/19396696/415-u...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question