Assert updated with the returned status code instead of URL

Dependencies:   ublox-at-cellular-interface

Revision:
17:ac64a6b90925
Parent:
15:6f0a1ecc8cec
--- a/UbloxATCellularInterfaceExt.cpp	Mon Nov 12 18:35:20 2018 +0500
+++ b/UbloxATCellularInterfaceExt.cpp	Mon Jan 28 12:45:09 2019 +0500
@@ -617,7 +617,7 @@
                                                                               const char *sendStr,
                                                                               int httpContentType,
                                                                               const char *httpCustomPar,
-                                                                              char *buf, int len)
+                                                                              char *buf, int len, int *read_size)
 {
     bool atSuccess = false;
     bool success = false;
@@ -694,6 +694,7 @@
 
         if (atSuccess) {
             Timer timer;
+            int read_length = 0;
 
             at_set_timeout(1000);
             _httpProfiles[httpProfile].pending = true;
@@ -709,8 +710,14 @@
                         // Leave a short delay to make sure the file has been written
                         wait_ms(100);
                         // HTTP command successfully executed
-                        if (readFile(rspFile, buf, len) >= 0) {
+                        read_length = readFile(rspFile, buf, len);
+
+                        if (read_length >= 0) {
                             success = true;
+
+                            if(read_size != NULL) {
+                                *read_size = *read_size + read_length;
+                            }
                         }
                     } else {
                         // Retrieve the error class and code