์ด์ ๊ป ์น๋ทฐ์์ url์ ๋ก๋ํ๋ฉด ๋น์ฐํ 200์ด ๋จ์ด์ง๋๊น html ํ์ผ์ด ํ๋ฉด์ ๋ ธ์ถ๋๋ ์๋๋ฆฌ์ค๋ง ์์ ํ๋ค๊ฐ,
์ด๋ฒ์๋ api๋ฅผ ์ฐ๋ฌ์ 200 ์ฝ๋๋ฅผ ๋ฐ์์ผ์ง๋ง ์น๋ทฐ๋ฅผ ๋ ธ์ถ์์ผ html ํ์ผ์ ๋ก๋ํ๋ ์๋๋ฆฌ์ค๋ฅผ ์์ ํ๊ฒ ๋์๋ค.
๊ธฐ์กด ์ฑ์์ ์ฌ์ฉํด ์จ Retrofit2๋ก ์์ ํ๊ธฐ๋ก ํ๋ค.
๊ณ ๋ฏผํ ์ฌํญ๋ค์ด๋ค.
1. Call ๋๋ Response ๋ ์ค์ ์ด๋ ๊ฒ์ ์ธ ๊ฒ์ธ๊ฐ? > Response
Coroutine์ ์ฐ๊ณ ์์ด์, Response๊ฐ ๋ ์ ํฉํ๋ค๊ณ ์๊ฐํ๋ค. ๋น๋๊ธฐ ์์ ์ Response๊ฐ Call๋ณด๋ค ์ฌ์ฉํ๊ธฐ ์ข๋ค๊ณ ํ๋ค.
https://jeongupark-study-house.tistory.com/208
Retrofit call ๊ณผ Response ์ฐจ์ด
Android ๊ฐ๋ฐ ์ ๋คํธ์ํฌ ์์ ํ ๋ ๊ฐ์ฅ ๋ง์ด ์ฐ์ด๋ ๋ผ์ด๋ธ๋ฌ๋๋ Retrofit ์ ๋๋ค. (Retrofit์ ์์ธ ๋ด์ฉ์ https://square.github.io/retrofit/ ์ฌ๊ธฐ์ ํ์ธํ๋ฉด ๋ฉ๋๋ค) ์ฌ๊ธฐ์ ์์๋ณผ ๋ด์ฉ์ Retrofit์..
jeongupark-study-house.tistory.com
https://stackoverflow.com/questions/64124670/call-or-response-in-retrofit
Call or Response in Retrofit?
I want to know the difference between Call And Response ? That when to use Call & when to use to Response in Retrofit ? @GET("/albums/{id}") suspend fun functionOne(@Path(value = &quo...
stackoverflow.com
2. Html reponse๋ฅผ ๋ฐ๊ธฐ ์ํด ์ด๋ค ๊ฐ์ฒด๋ฅผ ์จ์ผ ํ๋๊ฐ? > ResponseBody
์์ ๋ก html response๋ ResponseBody๋ฅผ ์ฌ์ฉํ๋ ๊ฒ๋ค๋ง ํ์ธํ๋ค.
https://jaejong.tistory.com/34
[์๋๋ก์ด๋] Retrofit2 - ResponseBody ๋ฐํํ์ ์ถ๋ ฅ
Retrofit - ResponseBody ์์ ๋ฐ์ดํฐ ์ถ๋ ฅ Call - Retrofit์ผ๋ก ๋ฐ์์จ ์์๋ฐ์ดํฐ๋ฅผ ๊ฐ๊ณต์์ด ์ถ๋ ฅํ๊ธฐ Open API '๊ณต๊ณต๋ฐ์ดํฐ ํฌํธ' ์ธก์ ์์ ๋ณด ์กฐํ ์๋น์ค API - 'TM ๊ธฐ์ค์ขํ ์กฐํ' ์๋ต๊ฒฐ๊ณผ๋ฅผ JSON / XML ๊ฐ..
jaejong.tistory.com
https://mobikul.com/handle-html-response-from-http-request-using-retrofit/
Handle the HTML Response from HTTP Request using Retrofit - Mobikul
In this blog, we will learn how to handle the HTML Keep Reading...
mobikul.com
https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response-body/
ResponseBody - OkHttp - OkHttp
//okhttp/okhttp3/ResponseBody ResponseBody [common]\ expect abstract class ResponseBody : Closeable A one-shot stream from the origin server to the client application with the raw bytes of the response body. Each response body is supported by an active con
square.github.io
* ResponseBody๋ฅผ ๋ฐ์ ๊ฒฝ์ฐ ๊ผญ close ํด์ผ ํ๋ค. ์๊ทธ๋ฌ๋ฉด ๋ฆฌ์์ค ๋์๋ก ์ฑ์ด ๋๋ ค์ง๊ฑฐ๋ ํฌ๋์๋๋ค๊ณ ํ๋ค.
3. html response๋ฅผ ์น๋ทฐ์ ๋ก๋ํ ์ ์๋ ๋ฐฉ๋ฒ > WebView.loadData(ResposeBody.string(), "text/html", "utf-8")
WebView์ loadData() ๋ผ๋ ํจ์๋ฅผ ์ฐ๋ฉด ๋๋ ๊ฑฐ์๋ค.
html ํ์ผ์ ํ ์คํธ ๊ฐ์ Response.body().string()์ผ๋ก ๋ฐ์ ์ ์๋ค. (Response.body()๊ฐ ResponseBody ๊ฐ์ ๋ฐํํ๋ค.)
Response.body().string์ด ResponseBody๋ฅผ close()ํด์ฃผ๊ธฐ๋ ํ๋,
https://stackoverflow.com/questions/13816464/how-to-load-html-string-in-a-webview
How to load html string in a webview?
i have a html string containing this: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> <html> <head> <meta http-equiv="content-type" conte...
stackoverflow.com
WebView | Android Developers
android.net.wifi.hotspot2.omadm
developer.android.com
ํ ์คํธ๋ฅผ ํ๋๋ฐ, html response๋ฅผ webview์ ๋ก๋ํ๋ ๋ฐ์ ์คํจํ๋ค. html ๋ด์ฉ์ ๊น์ ๋ดค๋๋, ์ด๋ฏธ์ง๋ฅผ ์๋ฒ์์ ๋ฐ์ ๋ก๋ํ๋ ๊ฑฐ์๋ค. html reponse๋ฅผ text๋ก ๋ฐ์์ webview์ ๋์์ฃผ๋ฉด, ์ด๋ฏธ์ง ํ์ผ ์ฃผ์๋ฅผ ๋ก์ปฌ์์ ์ฐพ์ผ๋ ค๊ณ ํ๊ธฐ ๋๋ฌธ์ ๋ก๋ ์คํจ๊ฐ ๋์ค๋ ๊ฒ์ ์์๋ค.
invisible ์ํ์ ์น๋ทฐ์์ url์ ๋ก๋ํ๊ณ 200 ์ํ ์ฝ๋๊ฐ ๋จ์ด์ง๋ฉด ์น๋ทฐ๋ฅผ visible ํ๊ฒ ๋ง๋ค๋๋ก ํ๋ ๋ฐฉ๋ฒ๋ ์๋ค๋ ๊ฒ์ ์์๋ค. ๊ทธ๋ฐ๋ฐ ์๋๋ก์ด๋ธ ์น๋ทฐ๋ 200 ์ํ ์ฝ๋๋ฅผ ๋ฐ๋ ๊ธฐ๋ฅ์ ์์๋ค. ๊ทธ๋๋ง ์๋ฌ์ฝ๋๋ ๋ฐ์ ์ ์์๋ค.
https://zerodice0.tistory.com/207
Android์ WebView๋ฅผ ์ฌ์ฉํ ๋, ํด๋ผ์ด์ธํธ ์๋ฌ๋ฅผ ์ถ์ ํ๋ ๋ฐฉ๋ฒ ์ ๋ฆฌ.
WevView๋ฅผ ์ธํ ํด๋ณด์. ์ฐ์ ์ ๋ ์ด์์์ ๋ง๋ค์ด๋ณด์. ์น๋ทฐ๋ฅผ ์กํฐ๋นํฐ ํ ๊ฐ๋ ๋์๋์๊ฑฐ๋๊น, ์๋์ฒ๋ผ xml ํ์ผ์ ์์ฑํ๋ฉด ๋๋ค. <?xml version="1.0" encoding="utf-8"?> xmlํ์ผ์ ์์ฑ์ด ๋๋ฌ๋ค๋ฉด, ์ด
zerodice0.tistory.com
๊ทธ๋ฐ๋ฐ ์ฐ๊ฒฐ ์ํ๊ฐ 200์ผ๋ก ๋จ์ด์ ธ๋, ํ๋ฉด์ ๋ก๋ํ๋ฉด์ ๋ค๋ฅธ ๋ฆฌ์์ค์ ๋ฌธ์ ๊ฐ ์๊ธฐ๋ฉด ์๋ฌ์ฝ๋๋ฅผ ๋ฐ๊ฒ ๋์ด ์ฐ๊ฒฐ ์ํ๋ง์ 200 ์ํ๋ฅผ ์๊ธฐ ์ด๋ ค์ ๋ค.
๋ถ๋ช 200์ผ๋ก ๋จ์ด์ ธ์ผ ๋ง๋ ํ๋ฐ, ์ด๋์ ์๋ชป๋๋์ง ํ์ ํ๊ธฐ ์ํด์ ํฌ๋กฌ ๊ฐ๋ฐ์ ๋๊ตฌ๋ฅผ ํ์ฉํ๋ค.
ํฌ๋กฌ ๊ฐ๋ฐ์ ๋๊ตฌ๋ก ๋ณด๋ HTTP ํค๋ ์์๋ณด๊ธฐ
๋ถ๋๋ฝ์ง๋ง ๋ ์ด๊ฑฐ ๋ชฐ๋์๋ค... ๋ด๊ฐ ์ ํญ์ ํ๋ฝํ๋์ง ์ด์ ๋ ์๊ณ ์์ผ๋ ํญ์ ์ค์ฒ์ด ๋ฌธ์ ์๋ค. ์ฐ์ ์ ๋๋ก ํ์ตํ์ง ๋ชปํด ๊ธฐ์ด ์์ค์ด ๋ฏธ๋ฌ์ด๊ธฐ ๋๋ฌธ์ด๋ค. + ์ง๋ฌธ์ ์๋ ํ์ ๋ชปํจ. ์๋
velog.io

favicon.ico๊ฐ ๋ฌด์์ธ์ง ์ฐพ์๋ณด์๊ณ ..
https://cheonfamily.tistory.com/7
favicon.ico ์ค๋ฅ 404 ๋ฉ์์ง ํด๊ฒฐ ๋ฐฉ๋ฒ
์นํ์ด์ง ๊ฐ๋ฐ์ ํ๋ค๋ณด๋ฉด ๊ฐ๋ฐ์๋๊ตฌ F12 ์ ์ฝ์์ฐฝ์ favicon.ico error message ๊ฐ ๋ณด์ ๋๋ค. ๋ญ ๋ฌธ์ ๋๋ ๊ฑด ์์ง๋ง, ๋นจ๊ฐ์์ผ๋ก ํ ๋จ๋๊น ์ฑ๊ฐ์์ฃ ... ์ด favicon.ico ๋ ๋ธ๋ผ์ฐ์ ํ์ดํ ๋งจ ์ผ์ชฝ์ ๋ณด
cheonfamily.tistory.com
์๋ฒ ๊ฐ๋ฐ์๋ถ๊ป ํ์ธ ์์ฒญ๋๋ ค์ ๊ทธ ๋ค์๋ถํฐ๋ 200์ผ๋ก ๋ฐ์๋ค.
์ด๋ ๊ฒ ์ค์ปท ํค๋ฉ๊ณ ์ฝ์งํ๋๋ฐ ๊ฒฐ๊ตญ์ ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ๊ธฐ๋ฅ์ ๊ตฌํํ๋ค. ๐ ๊ทธ๋ ๋ฐฐ์ด ๊ฒ ๊ฝค ์์ผ๋ ๊ด์ฐฎ๋ค.