![](/img/trans.png)
[英]how to send media with meta data (caption, description) via POST request to WordPress REST API with python
[英]How to send post request in Python for Ant media API
我正在嘗試編寫一個 python HTTP 請求代碼,以通過其 API 之一將數據發送到 Ant 媒體服務器。 但是我無法發送 POST 請求,但是我在 GET 請求中成功了。
import requests
url = "http://localhost:5080/LiveApp/rest/broadcast/create"
body12 = {
"name": "TESTAPIsss",
"description":"hiiii",
"type": "streamSource",
"streamId":"650320906975923279669775",
"streamUrl": "rlink"
}
headers = {'content-type': 'application/json'}
x = requests.post(url, data=body12, headers=headers)
print(x.text)
我面臨的錯誤是
無法識別的標記“名稱”:在 [來源:(org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); 處期待“空”、“真”、“假”或 NaN; 行:1,列:6]
這個答案不再有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.