Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Technik
protocol-translation-live
Commits
53bbd232
Commit
53bbd232
authored
Apr 22, 2022
by
Jakob Lerch
Browse files
replace get with post request in pad.py
parent
7b4d4b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
protocol_translation_live/pad.py
View file @
53bbd232
...
...
@@ -38,14 +38,15 @@ class Etherpad(Pad):
"&padID="
+
self
.
pad_id
)
if
not
r
.
json
()[
"code"
]
==
0
:
assert
False
raise
Exception
(
r
.
json
()[
"message"
])
return
r
.
json
()[
"data"
][
"text"
]
def
write
(
self
,
string
:
str
)
->
None
:
r
=
requests
.
get
(
self
.
main_url
+
"/api/1/setText?apikey="
+
self
.
api_key
+
"&padID="
+
self
.
pad_id
+
"&text="
+
string
)
r
=
requests
.
post
(
url
=
self
.
main_url
+
"/api/1/setText?apikey="
+
self
.
api_key
+
"&padID="
+
self
.
pad_id
,
data
=
{
"text"
:
string
})
if
not
r
.
json
()[
"code"
]
==
0
:
raise
Exception
(
r
.
json
()[
"message"
])
...
...
Write
Preview
Supports
Markdown
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