Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hoang Tran
ttproto
Commits
a39c53ae
Commit
a39c53ae
authored
Jul 24, 2018
by
Hoang Tran
Browse files
modified CoAPCode for FETCH, PATCH and iPATCH
parent
cc326776
Changes
1
Hide whitespace changes
Inline
Side-by-side
ttproto/core/lib/inet/coap.py
View file @
a39c53ae
...
...
@@ -349,6 +349,9 @@ class _CoAPCodeDescription:
2
:
"POST"
,
3
:
"PUT"
,
4
:
"DELETE"
,
5
:
"FETCH"
,
6
:
"PATCH"
,
7
:
"iPATCH"
,
# Responses
65
:
"2.01 Created"
,
...
...
@@ -413,8 +416,7 @@ class CoAPType (UInt2):
return
super
().
__new__
(
cls
,
value
)
class
CoAPCode
(
UInt8
):
__values
=
"Empty"
,
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
__values
=
"Empty"
,
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"FETCH"
,
"PATCH"
,
"iPATCH"
def
__new__
(
cls
,
value
):
if
isinstance
(
value
,
str
):
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment