The code is available at github https://github.com/anupak/esp8266-samplecode/tree/master/coap_test. The accompanying description is in the following blog post http://forgetfullbrain.blogspot.com/2015/10/microcoap-on-esp8266-esp-01.html
Feedback is welcome.
-Anup