[英]How to resolve TemplateSyntaxError: Could not parse the remainder error?
[英]How to fix cur error: could not resolve host error
我正在學習網絡(python 中的套接字庫)並且遇到了問題。 當我向此應用發出請求時,此請求的答案是錯誤:“無法解析主機:POST”
這是我的代碼
import socket
sock = socket.socket()
sock.bind(('',9091))
print("DATABASE INITED")
while True:
sock.listen(1)
connection, address = sock.accept()
buf = connection.recv(64)
if len(buf) > 0:
print(buf)
conn.send(buf.upper())
conn.close()
這是卷曲請求的代碼
curl -d "data = 'example'" POST 127.0.0.1:9091
位於一台 Linux 計算機上的查詢和程序。
嘗試這個:
curl --data "data = 'example'" 127.0.0.1:9091
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.