Beispiel #1
0
        static CoapMessageCode GetMessageCode(CoapRequestMethod method)
        {
            switch (method)
            {
            case CoapRequestMethod.Get: return(CoapMessageCodes.Get);

            case CoapRequestMethod.Post: return(CoapMessageCodes.Post);

            case CoapRequestMethod.Delete: return(CoapMessageCodes.Delete);

            case CoapRequestMethod.Put: return(CoapMessageCodes.Put);

            default: throw new NotSupportedException();
            }
        }
Beispiel #2
0
 public CoapRequestBuilder WithMethod(CoapRequestMethod value)
 {
     _request.Method = value;
     return(this);
 }