小编mah*_*yar的帖子

在 django requests 模块中使用多值参数发出 get 请求?

我有一个提供文档列表的网络服务。我通过get_doc_list调用此网络服务。但是当我将 2 个值传递给 id__in 时,它会返回一个映射对象。

def get_doc_list(self, id__in):
        config = self.configurer.doc
        params = {
            "id__in": id__in,
        }
        response = self._make_request(
            token=self.access_token,
            method='get',
            proxies=self.proxies,
            url=config.service_url,
            params=params,
            module_name=self.module_name,
            finalize_response=False
        )
        return response
Run Code Online (Sandbox Code Playgroud)

我该如何解决它?

python django django-rest-framework

5
推荐指数
1
解决办法
73
查看次数

标签 统计

django ×1

django-rest-framework ×1

python ×1