// 불필요한 코드들 중략... 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().t..
http 패키지(https://pub.dartlang.org/packages/http) 를 이용하여 문자열을 내려 받을때 한글이 깨지는 경우final response = await http .post('https://targeturl.pr.kr', body: {'userid' : userid.text, 'userpw' : userpw.text}) .timeout(Duration(seconds: 3)); if (response.statusCode == 200) { print('데이터 수신 ' + response.contentLength.toString() + 'byte'); print(response.body); // 한글 깨짐 print(utf8.decode(response.bodyBytes)); // ..
출처 : http://whitegom.tistory.com/26 import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class httpGetXmlTest { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub URL url = new URL("http://192.168.137.130:8080/exam/xml3/admin"); // open connection HttpURLConnection conn = (HttpURL..
- Total
- Today
- Yesterday
- MySQL
- JavaScript
- SSL
- devel
- Spring
- Java
- gpkiapi
- Mobile
- food
- Flutter
- samba
- dart
- 맛집
- Security
- Fun
- place
- json parse
- web
- 엘리스센터
- springboot
- Android
- devtools
- ssh
- Review
- Linux
- Compile
- TIP
- HTTP
- kotlin
- development
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |