I'd really prefer to not have a full copy of this code in OkHttp