티스토리 뷰
// 불필요한 코드들 중략...
val client = HttpClients.createDefault()
val httpPost = HttpPost("https://freecatz.pe.kr/auth")
httpPost.addHeader("Accept", "application/json;charset=utf-8") // 이 코드가 있어도 한글 깨짐
httpPost.addHeader("Content-Type", "application/json;charset=utf-8") // 이 코드가 있어도 한글 깨짐
/* 한글 깨짐
httpPost.entity = StringEntity(jarry.toString())
httpPost.entity = StringEntity(String(jarry.toString().toByteArray(), Charsets.UTF_8))
httpPost.entity = StringEntity(String(jarry.toString().toByteArray(Charsets.UTF_8), Charsets.UTF_8))
*/
httpPost.entity = StringEntity(jarry.toString(), Charsets.UTF_8) // 한글 깨짐 해결
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- web
- Fun
- dart
- samba
- development
- SSL
- devel
- Java
- devtools
- HTTP
- food
- Review
- Flutter
- gpkiapi
- MySQL
- place
- ssh
- springboot
- 맛집
- Compile
- 엘리스센터
- Android
- TIP
- kotlin
- Mobile
- JavaScript
- json parse
- Security
- Spring
- Linux
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함