cookies - 将 cookie 添加到 GET 请求未显示
问题描述
我正在尝试将 cookie 添加到包含令牌的 GET 请求中。我尝试了以下方法:
WebTarget wt = client.target(url).path(path);
wt.queryParam(binaryRepsonse, binaryResponse)
.request(new MediaType[] {MediaType.APPLICATION_OCTET_STREAM_TYPE})
.cookie("session", userCredential)
.get(InputStream.class);
但是,它似乎没有添加任何 cookie。任何指针?
解决方案
推荐阅读
- spring-boot - 执行 springwebflow 流关联视图未呈现的问题
- php - 使用 php 和 xml 在 html 中创建数组的问题
- scala - SCALA:从端点下载 blob 时出错:输入索引 0 处出现意外字符“<”
- sql - TSQL:按季度划分的递归日期
- android - 如何为editText设置提示可见性为真
- python-3.x - Python模板匹配
- javascript - 如何以编程方式设置 React Dropdown 的值
- python - 如何修复:TypeError:只能添加 LpConstraintVar、LpConstraint、LpAffineExpression 或 True 对象
- pandas - 如何在 Seaborn 中为双变量图生成颜色图例?
- python - Case When, on Else 从数据框中的现有列中获取值