Add documentation

This commit is contained in:
Niels Andriesse 2021-07-09 15:11:59 +10:00
parent bb1eb2310c
commit 3bbfef7d81

View File

@ -89,8 +89,8 @@ object HTTP {
*/
fun execute(verb: Verb, url: String, body: ByteArray?, timeout: Long = HTTP.timeout, useSeedNodeConnection: Boolean = false): Map<*, *> {
val request = Request.Builder().url(url)
.removeHeader("User-Agent").addHeader("User-Agent", "WhatsApp")
.removeHeader("Accept-Language").addHeader("Accept-Language", "en-us")
.removeHeader("User-Agent").addHeader("User-Agent", "WhatsApp") // Set a fake value
.removeHeader("Accept-Language").addHeader("Accept-Language", "en-us") // Set a fake value
when (verb) {
Verb.GET -> request.get()
Verb.PUT, Verb.POST -> {