I am using Keil RTX5 using the MDK Middleware Network component TCP/IP and I am trying to implement the RESTful interface.
As an example Given a URL of : 188.8.131.52:8000/.../IDAccountInquiry the
IP4 is 184.108.40.206
Port = 8000
In netTCP_Connect(tcp_sock, &addr, 0); how do I add the URL_path /api/IDAccountInquiry to the address? Or do I??
"In netTCP_Connect(tcp_sock, &addr, 0); how do I add the URL_path /api/IDAccountInquiry to the address? Or do I??"
-> No, you cannot. netTCP_Connect() is only used to connect the remote TCP socket. It is NOT used to send any real TCP data, or URL in your case.
Currently MDK Middleware network library doesn't have any RESTful client web service APIs that you can use directly to send a RESTful request. As a workaround, you have to call netTCP_Send() manually to send the entire RESTful request, including necessary http headers, in a TCP socket packet.
Good idea, thank you for the information. I will add the URL path to the data.
Is there any chance in the near future the MDK Middleware network library will include a RESTful example?
View all questions in Keil forum