【发布时间】:2020-08-28 12:38:36
【问题描述】:
ResponseEntity<String> respEntity = null;
try {
respEntity = getConfiguredRestTemplate().exchange(uri.toString()
, HttpMethod.GET
, entity
, new ParameterizedTypeReference<String>() {
});
log.debug("URL to retrieve a document : {}", respEntity.getBody());
}
respEntity.getBody() 返回 {"url":"https://aps-fst"}
我只想将值 - https://aps-fst 作为参数发送到函数以下载 URL 中的内容。如何仅提取 URL 值并将其作为 URL / String 类型的参数传递?
【问题讨论】:
-
这能回答你的问题吗? How to parse JSON in Java。它被称为 JSON 解析。检查我共享的链接以获取信息。
标签: java json httpresponse http-method