Skip to main content



      Home
Home » Eclipse Projects » Californium (Cf) CoAP Framework » How to add Header to CoAP request
How to add Header to CoAP request [message #1740397] Fri, 12 August 2016 09:58 Go to next message
Eclipse UserFriend
Hi all,
I am new in this CoAP topic and I am implementing OM2M platform which is a Java-based implementation to provide machine-to-machine services, based on ETSI-M2M/oneM2M standard. And in this OM2M standard, it support users to send both HTTP and CoAP requests to perform services. However, OM2M requires an authorization username and password in the request header, such as: Header key: value. When I tried with HTTP, it is possible to add header to the request using available plugin REST Client. When I moved to CoAP, I used Californium with simple CoAP client to send GET request to the OM2M:

CoapClient client = new CoapClient(uri)
client.get();


but I receive error 4.03 because the OM2M requires authorization in the header but and I dont know how to put this header to the CoAP request.

Does anyone have an idea how can I put header to a CoAP Get/Post request?
Re: How to add Header to CoAP request [message #1741252 is a reply to message #1740397] Wed, 24 August 2016 03:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Son Duong,
Can you guide me to californium tutorial for server or client? I tried Google but still wandering aimlessly
Re: How to add Header to CoAP request [message #1742483 is a reply to message #1741252] Fri, 02 September 2016 06:21 Go to previous message
Eclipse UserFriend
Hi Muhammad,

sorry for the late response. You can find tutorial for coap under: https://www.eclipsecon.org/france2014/sites/default/files/slides/Hands-on%20with%20CoAP.pdf.

Have fun and good luck

Best regards,
Son
Previous Topic:How to add extra options to CoAP request?
Next Topic:cannot capture coap packets using rawcap
Goto Forum:
  


Current Time: Sat Nov 08 16:58:30 EST 2025

Powered by FUDForum. Page generated in 0.03877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top