/// <summary> /// Set the content format of the payload /// </summary> /// <param name="contentFormat">The content format identifier</param> public void SetContentFormat(CoAPContentFormatOption contentFormat) { if (this.Options == null) { this.Options = new CoAPHeaderOptions(); } this.Options.Add(new CoAPHeaderOption(CoAPHeaderOption.CONTENT_FORMAT, contentFormat.GetValueAsBytes())); }