Python 3.x python中RESTAPI的URL编码

Python 3.x python中RESTAPI的URL编码,python-3.x,rest,urlencode,Python 3.x,Rest,Urlencode,我的字典-->>>过滤器{严重性:严重性} omi_filter=urllib.parse.urlencode(过滤器) 输出-->>>>omi\u过滤器=严重性=严重性 事件url=https:///opr-web/rest/9.10/event_list?format=atom +“&”+omi_过滤器 现在我需要omi_过滤器 查询=严重性%20EQ%20“严重” 以下是omi参数的工作原理: https:///opr-web/rest/9.10/event_list?format=ato

我的字典-->>>过滤器{严重性:严重性}

omi_filter=urllib.parse.urlencode(过滤器) 输出-->>>>omi\u过滤器=严重性=严重性 事件url=https:///opr-web/rest/9.10/event_list?format=atom +“&”+omi_过滤器

现在我需要omi_过滤器 查询=严重性%20EQ%20“严重”

以下是omi参数的工作原理:

https:///opr-web/rest/9.10/event_list?format=atom&query=severity%20EQ%20“关键的”

但事件url如下所示:

https:///opr-web/rest/9.10/event_list?format=atom&severity=critical

它在通过http进行查询时工作良好 即http:///opr-web/rest/9.10/event_list?format=atom&severity=critical

严重性筛选依据 但在https中,筛选器不起作用,它会获取所有记录