---
title: "HttpClient getMethod postMethod response 字体集"
author: "cpu"
date: "2011-12-28T11:25:40Z"
tags: []
categories: ["编程语言"]
slug: "httpclient-getmethod-postmethod-response"
draft: false
lastmod: "2011-12-28T11:25:40Z"
id: 1328410
url: "https://cpu.iteye.com/blog/1328410"
---

getMethod.getResponseBodyAsString(); 返回结果乱码
是响应字体集的问题.设置一下就OK了.
getMethod.getParams().setContentCharset("GBK");