Skip to content

Commit f144d0a

Browse files
Update HttpClient.cpp
1 parent ccfd7d6 commit f144d0a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/HttpClient.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ void HttpClient::beginRequest()
6363
iState = eRequestStarted;
6464
}
6565

66+
void HttpClient::sendApiKeyHeader(const char* apiKey) {
67+
if (iState < eRequestSent) {
68+
finishHeaders();
69+
}
70+
71+
String header = "apikey: ";
72+
header += apiKey;
73+
sendHeader(header);
74+
}
75+
6676
int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
6777
const char* aContentType, int aContentLength, const byte aBody[])
6878
{

0 commit comments

Comments
 (0)