Explorar el Código

apple: return informative error string when the whole request fails.

Closes #32.
Sasha Szpakowski hace 1 año
padre
commit
6ccb7cb17c
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      src/apple/NSURLClient.mm

+ 5 - 0
src/apple/NSURLClient.mm

@@ -78,6 +78,11 @@ HTTPSClient::Reply NSURLClient::request(const HTTPSClient::Request &req)
 		}
 	}
 
+	if (reply.responseCode == 0 && body == nil && error != nil)
+	{
+		reply.body = toCppString(error.localizedDescription);
+	}
+
 	return reply;
 }}