@@ -670,15 +670,17 @@ class AsyncWebServerRequest {
670670
671671 AsyncWebServerResponse *
672672 beginResponse (FS &fs, const String &path, const char *contentType = asyncsrv::empty, bool download = false , AwsTemplateProcessor callback = nullptr );
673- AsyncWebServerResponse *
674- beginResponse (FS &fs, const String &path, const String &contentType = emptyString, bool download = false , AwsTemplateProcessor callback = nullptr ) {
673+ AsyncWebServerResponse *beginResponse (
674+ FS &fs, const String &path, const String &contentType = asyncsrv::emptyString, bool download = false , AwsTemplateProcessor callback = nullptr
675+ ) {
675676 return beginResponse (fs, path, contentType.c_str (), download, callback);
676677 }
677678
678679 AsyncWebServerResponse *
679680 beginResponse (File content, const String &path, const char *contentType = asyncsrv::empty, bool download = false , AwsTemplateProcessor callback = nullptr );
680- AsyncWebServerResponse *
681- beginResponse (File content, const String &path, const String &contentType = emptyString, bool download = false , AwsTemplateProcessor callback = nullptr ) {
681+ AsyncWebServerResponse *beginResponse (
682+ File content, const String &path, const String &contentType = asyncsrv::emptyString, bool download = false , AwsTemplateProcessor callback = nullptr
683+ ) {
682684 return beginResponse (content, path, contentType.c_str (), download, callback);
683685 }
684686
@@ -783,11 +785,11 @@ class AsyncWebServerRequest {
783785#endif
784786 const String &arg (size_t i) const ; // get request argument value by number
785787 const String &arg (int i) const {
786- return i < 0 ? emptyString : arg ((size_t )i);
788+ return i < 0 ? asyncsrv:: emptyString : arg ((size_t )i);
787789 };
788790 const String &argName (size_t i) const ; // get request argument name by number
789791 const String &argName (int i) const {
790- return i < 0 ? emptyString : argName ((size_t )i);
792+ return i < 0 ? asyncsrv:: emptyString : argName ((size_t )i);
791793 };
792794 bool hasArg (const char *name) const ; // check if argument exists
793795 bool hasArg (const String &name) const {
@@ -800,14 +802,14 @@ class AsyncWebServerRequest {
800802#ifdef ASYNCWEBSERVER_REGEX
801803 const String &pathArg (size_t i) const {
802804 if (i >= _pathParams.size ()) {
803- return emptyString;
805+ return asyncsrv:: emptyString;
804806 }
805807 auto it = _pathParams.begin ();
806808 std::advance (it, i);
807809 return *it;
808810 }
809811 const String &pathArg (int i) const {
810- return i < 0 ? emptyString : pathArg ((size_t )i);
812+ return i < 0 ? asyncsrv:: emptyString : pathArg ((size_t )i);
811813 }
812814#else
813815 const String &pathArg (size_t i) const __attribute__((error(" ERR: pathArg() requires -D ASYNCWEBSERVER_REGEX and only works on regex handlers" )));
@@ -826,11 +828,11 @@ class AsyncWebServerRequest {
826828
827829 const String &header (size_t i) const ; // get request header value by number
828830 const String &header (int i) const {
829- return i < 0 ? emptyString : header ((size_t )i);
831+ return i < 0 ? asyncsrv:: emptyString : header ((size_t )i);
830832 };
831833 const String &headerName (size_t i) const ; // get request header name by number
832834 const String &headerName (int i) const {
833- return i < 0 ? emptyString : headerName ((size_t )i);
835+ return i < 0 ? asyncsrv:: emptyString : headerName ((size_t )i);
834836 };
835837
836838 size_t headers () const ; // get header count
@@ -888,7 +890,7 @@ class AsyncWebServerRequest {
888890 _attributes[name] = value;
889891 }
890892 void setAttribute (const char *name, bool value) {
891- _attributes[name] = value ? " 1" : emptyString;
893+ _attributes[name] = value ? " 1" : asyncsrv:: emptyString;
892894 }
893895 void setAttribute (const char *name, long value) {
894896 _attributes[name] = String (value);
@@ -904,7 +906,7 @@ class AsyncWebServerRequest {
904906 return _attributes.find (name) != _attributes.end ();
905907 }
906908
907- const String &getAttribute (const char *name, const String &defaultValue = emptyString) const ;
909+ const String &getAttribute (const char *name, const String &defaultValue = asyncsrv:: emptyString) const ;
908910 bool getAttribute (const char *name, bool defaultValue) const ;
909911 long getAttribute (const char *name, long defaultValue) const ;
910912 float getAttribute (const char *name, float defaultValue) const ;
0 commit comments