PsychicHttp icon indicating copy to clipboard operation
PsychicHttp copied to clipboard

v2 - Either match ESPAsyncWS method names or provide a migration path (compile flag ?)

Open hoeken opened this issue 1 year ago • 0 comments

proposal from @mathieucarbou

send vs reply:

#ifdef PSYCHIC_TO_ESPASYNCWS
    esp_err_t send(int code) { return reply(code); }
    esp_err_t send(int code, const String& contentType = emptyString, const String& content = emptyString);
#endif

constructor:

PsychicHttpServer(uint16_t port = 80);

begin / end vs listen / stop:

#ifdef PSYCHIC_TO_ESPASYNCWS
    void begin(uint16_t port = 80) { listen(port); }
    void end() { stop(); }
#endif

etc...

hoeken avatar Aug 11 '24 15:08 hoeken