|
|
|
@ -88,7 +88,9 @@ object HTTP {
|
|
|
|
|
* Sync. Don't call from the main thread.
|
|
|
|
|
*/
|
|
|
|
|
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")
|
|
|
|
|
val request = Request.Builder().url(url)
|
|
|
|
|
.removeHeader("User-Agent").addHeader("User-Agent", "WhatsApp")
|
|
|
|
|
.removeHeader("Accept-Language").addHeader("Accept-Language", "en-us")
|
|
|
|
|
when (verb) {
|
|
|
|
|
Verb.GET -> request.get()
|
|
|
|
|
Verb.PUT, Verb.POST -> {
|
|
|
|
|