Skip to content

Commit 6557c7e

Browse files
committed
- Updated vector.push_back to .emplace_back to avoid unnecessary copies.
- Updated int port to uint16_t
1 parent 9d04e20 commit 6557c7e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ If you want to utilize this Library. Include the header file in your Arduino Ske
2222

2323
# R4HttpClient - Functions:
2424

25-
`void begin(client, url)`: Initializes the SSL client and extracts the host and endpoint from the provided URL for subsequent requests.
25+
`void begin(client, String url)`: Initializes the SSL client and extracts the host and endpoint from the provided URL for subsequent requests.
2626

27-
`void begin(client, url, port)`: Same as above, but also initializes a custom port for the client connection.
27+
`void begin(client, String url, uint16_t port)`: Same as above, but also initializes a custom port for the client connection.
2828

29-
`void addHeader(content)`: Adds custom headers to be sent with the HTTP request.
29+
`void addHeader(String content)`: Adds custom headers to be sent with the HTTP request.
3030

31-
`void setTimeout(ms)`: Sets a timeout for the client to terminate a request if it takes longer than the specified time in milliseconds.
31+
`void setTimeout(int ms)`: Sets a timeout for the client to terminate a request if it takes longer than the specified time in milliseconds.
3232

3333
`void setDebug(bool)`: Enables or disables debug mode, which displays raw HTTP messages.
3434

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"maintainer": true
1414
}
1515
],
16-
"version": "1.0.3",
16+
"version": "1.0.4",
1717
"frameworks": "arduino",
1818
"platforms": [
1919
"Arduino UNO R4 Boards",

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=R4HttpClient
2-
version=1.0.3
2+
version=1.0.4
33
author=Princetoniño Piscos <[email protected]>
44
maintainer=Princetoniño Piscos <[email protected]>
55
sentence=A lightweight HTTP client wrapper library for Arduino Uno R4 WiFi.

src/R4HttpClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void R4HttpClient::setDebug(const bool &debug)
7575
*/
7676
void R4HttpClient::addHeader(const String &content)
7777
{
78-
this->headers.push_back(content);
78+
this->headers.emplace_back(content);
7979
}
8080

8181
/*

0 commit comments

Comments
 (0)