Skip to content
This repository was archived by the owner on Jun 15, 2020. It is now read-only.

Examples #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Examples #3

wants to merge 5 commits into from

Conversation

tmedicci
Copy link

Added an example function that initializes the http server, receive a GET request and respond a HTML containing a "Hello World, from ESP32!" content. Documentation was updated.

@tmedicci
Copy link
Author

Added POST example function

@@ -415,7 +435,7 @@ static void form_data_handler_cb(http_context_t http_ctx, void* ctx)
const char* str;
size_t len;
http_request_get_data(http_ctx, &str, &len);
parse_urlencoded_args(ctx, str, len);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you did this? this code doesn't pass the form arguments correctly

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense that form_ctx (or simply ctx argument) refers to events others than HTTP_HANDLE_DATA so when we are parsing urlencoded arguments we are using the "original" context?

It works this way for me.

@tmedicci
Copy link
Author

tmedicci commented Aug 4, 2018

Is there any news about analyzing these PR? @igrr and @milamber-ls ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants