Browse Source

Es wird länger auf antworten zu http requests gewartet

Kolja Strohm 5 years ago
parent
commit
d0f441a0f8
2 changed files with 9 additions and 1 deletions
  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();