try to make coap.js interface look like http.request