我必须将客户端请求的Content-Type标头设置为#navbar {
position: absolute;
text-align: right;
top: 2em;
right: 3em;
}
.line1 {
background-color: white;
opacity: 0.3;
height: 3.5em;
width: 0.2em;
margin-bottom: 1em;
}
.text1 {
color: white;
font-family:'Nanum Myeongjo', serif;
font-weight: 800;
float: right;
margin-top: 1.5em;
margin-right: 1.5em;
visibility: visible;
}
.line1:hover > .text1 {
visibility: visible;
}
,默认情况下为DataSourceBuilder.create()
.url("jdbc:sqlserver://" + hostname + ":" + port + ";databaseName=" + schemaName + ";")
.driverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver").username(username)
.type(com.zaxxer.hikari.HikariDataSource.class).password(password).build();
我通过设置标题
Text/xml
已成功设置Content-type: text/xml; charset=utf-8
标头,但 HashMap headers = new HashMap<String, List<String>>();
headers.put("X-Client-Version", Collections.singletonList("1.0-RC"));
headers.put("Content-type", Collections.singletonList("Text/xml;"));
((BindingProvider) h).getRequestContext().put(MessageContext
.HTTP_REQUEST_HEADERS, headers);
保留了其默认值X-Client-Version
如何更改内容类型标题?