recherche

Maison  >  Questions et réponses  >  le corps du texte

android - http协议中的状态码不是可以反映所有的响应的情况,那为什么iOS 和安卓的还搞出-1001这种错误码出来?

比方说
ios

1

2

3

4

5

6

7

8

9

10

11

12

<code>-1000     NSURLErrorBadURL                    The connection failed due to a malformed URL.

-1001     NSURLErrorTimedOut                    The connection timed out.

-1002     NSURLErrorUnsupportedURL            The connection failed due to an unsupported URL scheme.

-1003     NSURLErrorCannotFindHost            The connection failed because the host could not be found.

-1004     NSURLErrorCannotConnectToHost        The connection failed because a connection cannot be made to the host.

-1005    NSURLErrorNetworkConnectionLost     The connection failed because the network connection was lost.

-1006     NSURLErrorDNSLookupFailed            The connection failed because the DNS lookup failed.

-1007     NSURLErrorHTTPTooManyRedirects        The HTTP connection failed due to too many redirects.

-1008    NSURLErrorResourceUnavailable           The connection’s resource is unavailable.

-1009     NSURLErrorNotConnectedToInternet"

 

为什么还要搞这些错误码出来?你是怎么看?</code>

PHPzPHPz2896 Il y a quelques jours635

répondre à tous(1)je répondrai

  • ringa_lee

    ringa_lee2017-04-18 09:57:10

    Ce sont des échecs côté client

    Si vous ne parvenez pas à vous connecter au serveur, vous ne pourrez pas obtenir le statut renvoyé par le serveur

    répondre
    0
  • Annulerrépondre