I get response code: 200 but however as a response text I get whole html page about Laravel.
I’m wondering the server side was set up wrong or I’m missing something in client.
However making POST via postman returns expected result.
Maybe the server responds based on the type of received data.
From the code it looks like you want to send data in JSON. However, you are not, you are sending an HTML form.
If you want to send JSON, you have to manually encode your data in JSON, convert to bytes and send those via Post (don’t forget to set the Content-Type, you can assign it to upload handlers property).
Thanks.
UnityWebRequest returns error HTTP/1.1 422 Unprocessable Entity without description.
Using Fiddler I saw actual error which was validation issue.
It’s essentially a server side issue. So there’s little you can do on the Unity side. There are countless of reasons why the server responds the way he did. This may be the result of a faulty request, that is true. However it’s still a server side issue when such errors are not handled properly on the server side.
Next time, please create your own thread since you now want to discuss your specific problem and not the problem the OP had. Chances are very very low that your issue is cause by the same thing. So unless you are here to solve the OPs issue, you should not try to hijack this thread for your own issue. Create a seperate thread and add your own details over there.