아래와 같은 코드...async 로 보내고있습니다.....한글이 깨지네요...마지막에 response로로그를 찍어보니
Response{protocol=http/1.1, code=500, message=Internal Server Error, url=http://52.78.115.xxx/register?title%EC%9E%90%EC%A0%84%EA%B1%B0&time=0&user_id=xxx}
이렇게 나옵니다 ㅜㅠ 한글깨지는것때문에 500에러나는거같은데...방법없을까요 addheader도 해보고 햇는데소용없네요
@Override
protected Void doInBackground(Void... params) {
Log.e("main","doinBack"+param[0]+"");
Log.e("main","doinBack"+param[1]+"");
Log.e("main","Length"+param.length+"");
Log.e("main","Length"+param[0]+"");
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.addHeader("content-type","charset=utf-8")
.url("http://52.78.115.xxx/register?title"+param[0]+"&time="+param[1]+"&user_id=xxx")
.build();
try {
Response response = client.newCall(request).execute();
Log.e("main",""+response);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}