mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Berry webclient.url_encode()
is now a static class method, no change required to existing code (#18775)
This commit is contained in:
parent
4e7475dbd4
commit
f8df9e5f00
@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file.
|
||||
- InfluxDb resolves DNS name before request (#18015)
|
||||
- Shutter sliders in WEBGUI automatically appear and disappear during configuration and update during movement (#18701)
|
||||
- AdafruitFingerprint library from v2.0.4 to v2.1.0
|
||||
- Berry `webclient.url_encode()` is now a static class method, no change required to existing code
|
||||
|
||||
### Fixed
|
||||
- ESP32 InfluxDb initial connection delays using HTTPClient (#18015)
|
||||
|
@ -45,7 +45,7 @@ class be_class_webclient (scope: global, name: webclient) {
|
||||
.w, var
|
||||
init, func(wc_init)
|
||||
deinit, func(wc_deinit)
|
||||
url_encode, func(wc_urlencode)
|
||||
url_encode, static_func(wc_urlencode)
|
||||
|
||||
begin, func(wc_begin)
|
||||
set_timeouts, func(wc_set_timeouts)
|
||||
|
@ -153,12 +153,12 @@ extern "C" {
|
||||
be_return_nil(vm);
|
||||
}
|
||||
|
||||
// wc.url_encode(string) -> string
|
||||
// wc.url_encode(string) -> string (static method)
|
||||
int32_t wc_urlencode(struct bvm *vm);
|
||||
int32_t wc_urlencode(struct bvm *vm) {
|
||||
int32_t argc = be_top(vm);
|
||||
if (argc >= 2 && be_isstring(vm, 2)) {
|
||||
const char * s = be_tostring(vm, 2);
|
||||
if (argc >= 1 && be_isstring(vm, 1)) {
|
||||
const char * s = be_tostring(vm, 1);
|
||||
String url = wc_UrlEncode(String(s));
|
||||
be_pushstring(vm, url.c_str());
|
||||
be_return(vm); /* return self */
|
||||
|
Loading…
x
Reference in New Issue
Block a user