Added coap request function