cancel
Showing results for 
Search instead for 
Did you mean: 

Netx HTTPS POST request

sabari1
Associate III

hi 

i am working with HTTPS client code on stm32u585 microcontroller, using netx tcp/ip stack for the implementation. my requirement is to create a HTTPS post request with a json payload( nearly 8000 bytes). is there any reference or example available on HTTPS post request using netx. all i can see is the get request in the official GitHub.

if any example or reference regarding this issue will be much helpful for implementation.

 

with regards 

sabarinath 

4 REPLIES 4
mbarg.1
Senior III

HTTP messages are decoded in _nx_web_http_server_receive_data.c

Here GET and POST messages are selected

in case of POST, VOID _nx_web_http_server_put_process(NX_WEB_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr) is called 

inside _nx_web_http_server_put_process() nx_web_http_server_request_notify() is called

You have to provide nx_web_http_server_request_notify() and assignto your HTTP server in  nx_web_http_server_create()

/* Call the user supplied function to notify the user of the put request. */

status = (server_ptr -> nx_web_http_server_request_notify)(server_ptr, NX_WEB_HTTP_SERVER_PUT_REQUEST, server_ptr -> nx_web_http_server_request_resource, packet_ptr);

 

 


@mbarg.1 wrote:

HTTP messages are decoded in _nx_web_http_server_receive_data.c


That's the server side; I think @sabari1 is asking for the client side - ie how to make the request ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

OOPS ..

@Andrew Neil is right.

As far as I know, no examples for this case.

I guess @sabari1 has to use TCP socket to send a packet with HTTP/HTTPS PUT request writing ad hoc code.

Later will have to manage server reply ...

 

@sabari1 It seems that NetX Duo has an HTTP Client:

 

Chapter 1 - Introduction to HTTP and HTTPS
This chapter introduces the NetX Duo HTTP/HTTPS for Web module:

https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/netx-duo-web-http/chapter1.md

 

Previously, in this forum:

Solved: ThreadX NetXDuo https client post request problem

https://community.st.com/t5/stm32-mcus-embedded-software/threadx-netxduo-https-client-post-request-problem/td-p/755267

 

Both via: https://www.google.com/search?q=netx+HTTPS+client

(other internet search engines are available)

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.