@startuml skinparam dpi 300 Application -> HTTP_Client_Lib: HTTPClient_Send(Request Headers, Request Body, Response) activate HTTP_Client_Lib #lightgreen HTTP_Client_Lib -> Application: transport send(Request Headers) activate Application #lightblue Application -> Application: Send Request Headers over the network. Application --> HTTP_Client_Lib: Return SUCCESS deactivate Application note right: **transport send** is repeated if\nfewer bytes than requested to\nsend are sent.\nFor the sake of simplicity this\nexample returns successfully\nfrom the transport interface. HTTP_Client_Lib -> Application: transport send(Request Body) activate Application #lightblue Application -> Application: Send Request Body over the network. Application --> HTTP_Client_Lib: Return SUCCESS deactivate Application loop While response buffer is NOT full &&\nResponse message is NOT complete &&\nNo errors found in parsing HTTP_Client_Lib -> Application: transport read(Response buffer) activate Application #lightblue Application -> Application: Receive network data into the Response buffer. Application --> HTTP_Client_Lib: Return SUCCESS deactivate Application HTTP_Client_Lib -> HTTP_Client_Lib: Parse Response activate HTTP_Client_Lib #darkgreen loop for each response header found in parsing HTTP_Client_Lib -> Application: __**onHeaderCallback**__(Response Header Field,\n Response Header Value,\n Response Status) activate Application #lightblue Application -> Application: Do stuff with the Header Application --> HTTP_Client_Lib: Return deactivate Application end deactivate HTTP_Client_Lib end HTTP_Client_Lib --> Application: Return HTTP_RETURN_CODE deactivate HTTP_Client_Lib @enduml