Skip to content

Commit c18f7cb

Browse files
authored
Made ESP8266WebServer::client() return a reference (fixes esp8266#7075) (esp8266#7080)
1 parent 3c1bd65 commit c18f7cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/ESP8266WebServer/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Other Function Calls
154154
155155
const String & uri(); // get the current uri
156156
HTTPMethod method(); // get the current method
157-
WiFiClient client(); // get the current client
157+
WiFiClient & client(); // get the current client
158158
HTTPUpload & upload(); // get the current upload
159159
void setContentLength(); // set content length
160160
void sendHeader(); // send HTTP header

libraries/ESP8266WebServer/src/ESP8266WebServer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class ESP8266WebServerTemplate
103103

104104
const String& uri() const { return _currentUri; }
105105
HTTPMethod method() const { return _currentMethod; }
106-
ClientType client() { return _currentClient; }
106+
ClientType& client() { return _currentClient; }
107107
HTTPUpload& upload() { return *_currentUpload; }
108108

109109
// Allows setting server options (i.e. SSL keys) by the instantiator

0 commit comments

Comments
 (0)