Skip to content

ESP8266WebServer args() result to high? #7106

Closed
@Stefan300381

Description

@Stefan300381

Hi,

I'd like to understand if the following is a feature or bug:

I pass a few post parameters to a URL to set my WiFi configuration. These are:

  • WiFiSSID = a
  • WiFiPasswd = b
  • DevName = c
  • useDHCP = true

I assumed if I get the number of arguments via httpserver.args() it would return "4", but it returns "5".

The content of the last argument is:
plain=WiFiSSID=a&WiFiPasswd=b&DevName=c&useDHCP=true

In the documentation I found:

arg - get request argument value, use arg("plain") to get POST body
argName - get request argument name
args - get arguments count

So is it expected that the post body gets counted in the args() integer?

best regards

Stefan

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions