Supply fake Accept-Language header

pull/653/head
Niels Andriesse 4 years ago
parent 7a388deb78
commit bb1eb2310c

@ -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 -> {

Loading…
Cancel
Save