Jelajahi Sumber

Es wird länger auf antworten zu http requests gewartet

Kolja Strohm 6 tahun lalu
induk
melakukan
d0f441a0f8
2 mengubah file dengan 9 tambahan dan 1 penghapusan
  1. 7 1
      Network/HttpRequest.cpp
  2. 2 0
      Network/HttpRequest.h

+ 7 - 1
Network/HttpRequest.cpp

@@ -42,7 +42,7 @@ Answer *PostRequest::execute() const
             answer += buff;
         else
             break;
-    } while( httpK.hatNachricht( 0 ) );
+    } while( httpK.hatNachricht( 1000 ) );
     return new Answer( answer );
 }
 
@@ -62,6 +62,7 @@ PostRequest *PostRequest::release()
 
 Answer::Answer( const char *answer )
 {
+    all = answer;
     TextReader reader( new Text( answer ) );
     // parse header
     Text *line = reader.leseZeile();
@@ -131,6 +132,11 @@ const char *Answer::getDate() const
     return date;
 }
 
+const char *Answer::getAll() const
+{
+    return all;
+}
+
 Answer *Answer::getThis()
 {
     ref++;

+ 2 - 0
Network/HttpRequest.h

@@ -16,6 +16,7 @@ namespace Network
             Framework::Text contentType;
             Framework::Text header;
             Framework::Text data;
+            Framework::Text all;
             int ref;
 
         public:
@@ -26,6 +27,7 @@ namespace Network
             __declspec( dllexport ) int getStatusCode() const;
             __declspec( dllexport ) const char *getStatusText() const;
             __declspec( dllexport ) const char *getDate() const;
+            __declspec( dllexport ) const char *getAll() const;
 
             __declspec( dllexport ) Answer *getThis();
             __declspec( dllexport ) Answer *release();