This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil RTX5 using the MDK Middleware Network component TCP/IP - Implementing RESTful interface.

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 :  13.58.41.12:8000/.../IDAccountInquiry the

IP4 is 13.58.41.12

Port = 8000

In netTCP_Connect(tcp_sock, &addr, 0); how do I add the URL_path  /api/IDAccountInquiry to the address?  Or do I??

Parents
  • "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.

Reply
  • "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.

Children