首页题库练习题目详情
Java语言程序设计单选题中等

在使用HttpURLConnection发送请求时,若需设置请求头中的Content-Type为application/json,应调用哪个方法?

AsetRequestMethod("application/json")
BsetRequestProperty("Content-Type", "application/json")
CsetHeader("Content-Type", "application/json")
DsetContentType("application/json")