我正在尝试访问带有空格的网址:
url_string = "http://api.company.com/SendMessageXml.ashx?SendXML=<company><User><Username>username</Username><Password>passweord</Password></User><Content Type=sms>.."
with urllib.request.urlopen(url_string) as url:
s = url.read()
问题在于“内容类型”中的空格将字符串分隔为两个不同的块。
如何发送此请求?