Sfoglia il codice sorgente

HTTPAnswer Klasse erweitert

Kolja Strohm 5 anni fa
parent
commit
ecdb017fb0
2 ha cambiato i file con 19 aggiunte e 1 eliminazioni
  1. 16 1
      Network/HttpRequest.cpp
  2. 3 0
      Network/HttpRequest.h

+ 16 - 1
Network/HttpRequest.cpp

@@ -91,7 +91,7 @@ Answer::Answer( const char *answer )
             header += *line;
             header += "\n";
         }
-        if( line->positionVon( "Data:" ) == 0 )
+        if( line->positionVon( "Date:" ) == 0 )
             this->date = line->getText() + 6;
         if( line->positionVon( "Content-Type:" ) == 0 )
             this->contentType = line->getText() + 14;
@@ -116,6 +116,21 @@ const char *Answer::getData() const
     return data;
 }
 
+int Answer::getStatusCode() const
+{
+    return statusNumber;
+}
+
+const char *Answer::getStatusText() const
+{
+    return statusText;
+}
+
+const char *Answer::getDate() const
+{
+    return date;
+}
+
 Answer *Answer::getThis()
 {
     ref++;

+ 3 - 0
Network/HttpRequest.h

@@ -23,6 +23,9 @@ namespace Network
 
             __declspec( dllexport ) const char *getContentType() const;
             __declspec( dllexport ) const char *getData() const;
+            __declspec( dllexport ) int getStatusCode() const;
+            __declspec( dllexport ) const char *getStatusText() const;
+            __declspec( dllexport ) const char *getDate() const;
 
             __declspec( dllexport ) Answer *getThis();
             __declspec( dllexport ) Answer *release();