[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] http post using lwip?

From: Bas Prins
Subject: Re: [lwip-users] http post using lwip?
Date: Fri, 1 Jul 2022 17:48:50 +0200

Dear lwip,
I'd really appreciate some feedback on this. Would it make sense to extend the http_client.c in such a way so that I can choose whether to create HTTP_GET or HTTP_POST requests?

err_t httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const httpc_connection_t *settings,
altcp_recv_fn recv_fn, void* callback_arg, httpc_state_t **connection);

For example add parameters to that signature to specify the request type? GET/POST + optional post data ?

Something like

enum httpc_request_type {

typedef struct _httpc_request_info {
httpc_request_type type;
const char * post_data;
} httpc_request_info_t;

and add that to the existing functions and implement them accordingly in the http_client? Would that be the correct approach? Would it be valuable for the community?

Op wo 29 jun. 2022 om 17:39 schreef Bas Prins <bas.prins3@gmail.com>:
Anybody who can share how to create http post requests with lwip? As mentioned below, i am using the http client.

Best regards bas

Op za 25 jun. 2022 14:06 schreef Bas Prins <bas.prins3@gmail.com>:

I am trying to find how to create a POST request using lwip 2.1.x stable. I can find the code that creates GET requests in https://git.savannah.nongnu.org/cgit/lwip.git/tree/src/apps/http/http_client.c?h=STABLE-2_1_x.

Is there something I can directly reuse in lwip or am I going to roll my own?


Best regards, bas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]