The Internet of Things (IoT) has emerged as the keynetworking paradigm for supporting the connectivity of massively distributed objects and numerous simultaneous applications. The Constrained Application Protocol (CoAP) is designed to meet the requirements for IoT data transmission among constrained nodes. The lean design of CoAP enables it to additionally meet the needs of the data transmission in dynamic network environments. In this paper, we conduct an emulation-based quantitative performance assessment of CoAP in comparison with HTTP, assessing data transmission based on key characteristics of dynamic network environments and the designed scenarios. We also designed scenarios and evaluate the performance of investigated protocols using real-world IoT datasets. Our experimental results demonstrate that CoAP performs better than HTTP for data transmission in the dynamic network environments with respect to delivery rate, delay, and overhead. In addition, we analyze the impact of features in dynamic network environments on the performance of data transmission protocols with respect to success rate, delay and overhead, as well as discuss some further extensions for future research.