A
A
Andrew2022-03-23 14:08:51
AJAX
Andrew, 2022-03-23 14:08:51

How to get your data from the Ajax error you get?

From JS, using Ajax, I send a request to the php function, in which a connection is made via websocket to the ws server. If the server is not available, an error is sent back, which I read in the error branch. How can I get the value of switch, resp from such a response? I get the response console.log(response['responseText']).
>>
Warning: fsockopen(): Unable to connect to localhost:7777 (An attempt to establish a connection was unsuccessful, because the required response was not received from another computer in the required time, or an already established connection was terminated due to an incorrect response from an already connected computer) in C:\web\OSr\domains\targos\src\ServersController.php on line 90
{" switch ":"show","":"\r\n .... }
<

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question