質問編集履歴
2
conten 内容
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,6 +11,9 @@
|
|
11
11
|
|
12
12
|
英語だと問題なく行きます。
|
13
13
|
|
14
|
+
content='%E3%83%86%E3%82%B9%E3%83%88'の文字にすると
|
15
|
+
テストの内容の文字を入力できます。
|
16
|
+
|
14
17
|
文字コードをどのように変換すれば良いか。
|
15
18
|
|
16
19
|
教えていただけると幸いでです。
|
@@ -20,7 +23,7 @@
|
|
20
23
|
import requests
|
21
24
|
|
22
25
|
#payload操作
|
23
|
-
content="
|
26
|
+
content="テスト".encode()
|
24
27
|
print(content.decode('utf-8'))
|
25
28
|
|
26
29
|
url = "http://test/api/v1/comment_test/"
|
1
python
test
CHANGED
File without changes
|
test
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
url = "http://test/api/v1/comment_test/"
|
27
27
|
|
28
|
-
payload='petition_id=1111&petition_type=1&content='+content.decode('utf-8')+'&m_user_id=111&parent=&
|
28
|
+
payload='petition_id=1111&petition_type=1&content='+content.decode('utf-8')+'&m_user_id=111&parent=&test=0'
|
29
29
|
|
30
30
|
|
31
31
|
response = requests.request("POST", url, headers=headers, data=payload)
|