Skip to content
Sander edited this page Feb 7, 2016 · 2 revisions

How to pass the StreamHttpRequest type to another method or function?

When you receive an error similar to: src/SomeFile.hpp:23:37: error: 'ArduinoHttpServer::StreamHttpRequest' is not a type

You might have forgotten to specify the capacity specifier (or template parameter). E.g.: void process(ArduinoHttpServer::StreamHttpRequest& httpSession); will produce a compilation similar to the error above due to the missing capacity specifier.

Either create a typedef like so:

typedef ArduinoHttpServer::StreamHttpRequest<511> MyRequest;

and use it in your function declaration and definition, or specify the capacity directly.

Clone this wiki locally