Skip to content

Retrieving HTTP header parameters should be case-insensitive using HTTPClient #8524

Closed
@TeepMZ

Description

@TeepMZ

Related area

it is related to Http request using HTTPClient

Hardware specification

ESP32-WROOM-DA-MODULE

Is your feature request related to a problem?

No

Describe the solution you'd like

Using the HTTPClient library to read a response received from the server via the HTTP protocol, we can use the collectHeaders and header functions to obtain specific header parameter values. Currently, the String HTTPClient::header(const char* name) function is case-sensitive. However, certain server containers might employ lowercase for all header parameters. Consequently, it would be advantageous for the HTTPClient::header function to be case-insensitive when searching for a specific parameter.

PS: A similar behavior is observed in the HTTPClient::handleHeaderResponse function, where the "equalsIgnoreCase" function is employed to verify the existence of a header key
Lib link : libraries/HTTPClient

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions