mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): HEAD request should return statusCode (#132)
This commit is contained in:
@@ -386,8 +386,6 @@ public class Async
|
||||
|
||||
public void readResponseStream(HttpURLConnection connection, Stack<Closeable> openedStreams, RequestOptions options) throws IOException
|
||||
{
|
||||
this.statusCode = connection.getResponseCode();
|
||||
|
||||
int contentLength = connection.getContentLength();
|
||||
|
||||
InputStream inStream;
|
||||
@@ -564,6 +562,7 @@ public class Async
|
||||
// build the result
|
||||
result.getHeaders(connection);
|
||||
result.url = options.url;
|
||||
result.statusCode = connection.getResponseCode();
|
||||
result.statusText = connection.getResponseMessage();
|
||||
if (!requestMethod.equals(HEAD_METHOD))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user