Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
azure-iot-edge-devices
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sireesha.k
azure-iot-edge-devices
Commits
0a91299a
Commit
0a91299a
authored
May 28, 2021
by
sireesha.k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated iotdevices.py
parent
dab06d97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
scripts/handler/iotdevices.py
scripts/handler/iotdevices.py
+5
-5
No files found.
scripts/handler/iotdevices.py
View file @
0a91299a
...
@@ -66,8 +66,8 @@ class DeviceManager:
...
@@ -66,8 +66,8 @@ class DeviceManager:
r
=
requests
.
get
(
url
,
headers
=
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
sasToken
})
r
=
requests
.
get
(
url
,
headers
=
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
sasToken
})
return
r
.
text
,
r
.
status_code
return
r
.
text
,
r
.
status_code
def
sendD2CMsg
(
self
,
deviceId
,
message
):
#
def sendD2CMsg(self, deviceId, message):
sasToken
=
self
.
_buildSasToken
()
#
sasToken = self._buildSasToken()
url
=
'https://
%
s/devices/
%
s/messages/events?api-version=
%
s'
%
(
self
.
iotHost
,
deviceId
,
self
.
API_VERSION
)
#
url = 'https://%s/devices/%s/messages/events?api-version=%s' % (self.iotHost, deviceId, self.API_VERSION)
r
=
requests
.
post
(
url
,
headers
=
{
'Authorization'
:
sasToken
},
data
=
message
)
#
r = requests.post(url, headers={'Authorization': sasToken}, data=message)
return
r
.
text
,
r
.
status_code
#
return r.text, r.status_code
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