Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
0 replies
39 views

Using OkHttp 5.3.2, how can I set the maximum time a connection is allowed to stay in the ConnectionPool, so that e.g. after 30 seconds a connection is closed and removed from the pool (after the ...
Torsten Krah's user avatar
3 votes
0 answers
126 views

I'm having problems receiving a JSON response from a REST endpoint using Retrofit. Some of the requests return JSON with a bunch of null characters and escaped double quotes. Pasted from Android ...
Miguel Vidal's user avatar
-1 votes
1 answer
204 views

I am developing an Eclipse plugin (OSGi environment) and trying to use OkHttp 4.11.0 to send HTTP requests. However, I get the following runtime error: java.lang.ClassNotFoundException: okio.Buffer ...
kiruba T's user avatar
2 votes
0 answers
128 views

I have a Springboot server with two ssl self signed certificates configured for different hostnames. One certificate assigned to hostname localhost. Another assigned as fallback, so any hostname other ...
naveejr's user avatar
  • 755
0 votes
1 answer
130 views

Been spending hours trying to get OkHttpClient to work with a proxy. My proxy supports socks5, https. I cannot get it to work on either. I've now spent hours trying different work arounds from years ...
Jacob Krumholz's user avatar
3 votes
1 answer
1k views

I've created an Empty Views Activity project in Android Studio, but as soon as I add the dependency in build.gradle.kts and try to launch the app, it throws an exception (see output). No code is ...
Beavis's user avatar
  • 33
1 vote
1 answer
112 views

According to the docs of OkHttpClient, it is better to use a single shared instance. In my case I need a client for HTTP requests and a client for WebSocket connections; both have different ...
KunLun's user avatar
  • 3,296
0 votes
0 answers
76 views

I have a CacheCreation class that prepares config for an OkHttp interceptor. It’s created during DI on app launch, and we currently use runBlocking so the object graph is ready before the first ...
Ajay's user avatar
  • 926
-1 votes
1 answer
170 views

I would like to build a native image with the newly released (as of this writing) Spring Boot 4.0.0-M1 and GraalVM AOT With this code: @Configuration public class TracingConfiguration { @Bean ...
PatPanda's user avatar
  • 5,546
0 votes
1 answer
76 views

I have an URL for file downloading and it works perfectly on my Samsung Galaxy S10 (running Android 12), but the same app throws java.io.FileNotFoundException on my Google Pixel 9 with the latest ...
zkminusck's user avatar
  • 1,238
4 votes
1 answer
2k views

OkHttp recently received a v5 update, meaning there are breaking changes. I've noticed these breaking changes, as my project no longer recognizes OkHttp or any of its classes. Unfortunately is the ...
Andre_601's user avatar
  • 377
0 votes
1 answer
190 views

I implemented a basic websockets server, following the instructions on the Ktor site (server, client). Server (complete source): webSocket("/echo") { send("Please enter your name&...
ixx's user avatar
  • 32.3k
1 vote
2 answers
232 views

I am uploading files to WebDav servers using RequestBody requestBody = new MultipartBody.Builder() .addPart(RequestBody.create(data, MediaType.parse("application/...
Philipp's user avatar
  • 11.7k
1 vote
1 answer
129 views

OkHttpClient version 4-12.0 sends multipart-form request using default configuration ; Sever responds with 100-Continue . After receiving couple of 100-Continue OkHttpClient fails with ...
George's user avatar
  • 521
1 vote
1 answer
124 views

I'm building a flask app to process images uploaded from a mobile device, before sending results back to the mobile app. I've successfully deployed the flask app on Azure, and can confirm it works ...
Oli's user avatar
  • 43
2 votes
2 answers
2k views

We recently switched from HttpUrlConnection to OkHttp (v4.12.0) on Android and started seeing CertPathValidatorException: Trust anchor for certification path not found from a small percentage of our ...
AlexVPerl's user avatar
  • 8,106
1 vote
0 answers
144 views

My Spring Boot uses okhttp3 to send HTTP requests as a client. I have no control over the servers. (But I can ask server team to change the settings if needs be.) <dependency> <groupId>...
Paul Chuang's user avatar
0 votes
0 answers
105 views

I’m facing an issue where the OkHttp client timeout doesn't work as expected. Conditions: About the Program: java client (Feign) generated using OpenAPI Generator. Using OkHttp 3 client. Flow: myapp-...
tttt's user avatar
  • 1
0 votes
2 answers
752 views

I've been tryin to get websockets working in my Android app. I am using OKhttp websockets, an apache proxy and a node server. I finally got a connection, but it connects and then within a few seconds ...
Neglected Sanity's user avatar
0 votes
1 answer
146 views

I have an app on API 34 that runs MockWebServer for the tests. Mockweberser is triggered only for tests that are mocked. Mockweberser class inits on port 8080 class MockedkWebServer { ... init { ...
AShX's user avatar
  • 432
0 votes
1 answer
128 views

I am working with OkHttp for my connections. To avoid memory leaks by closing responses. But the docs and none of the information I found explains which close to use. Here are the difference close ...
SMBiggs's user avatar
  • 11.8k
1 vote
1 answer
578 views

I'm trying to use OkHttpClient in Android Studio 4.1.3 and I'm getting the error "Cannot resolve symbol 'OkHttpClient'". I've found a number of posts for this problem but none solve my issue....
Jeremi Reda's user avatar
1 vote
0 answers
78 views

I am experiencing a weird issue that only affects some of my users (and unfortunately not my own devices). On wifi, when loading up resources, the data will take AGES to download. But then the user ...
StainlessSteelRat's user avatar
1 vote
1 answer
617 views

I'm writing tests for my webserver, and I'm making use of MockWebServer (okhttp3.mockwebserver) to mock the responses. As I understand it from the documentation, there are broadly 2 ways to do this: ...
tintin.92's user avatar
0 votes
0 answers
98 views

I'm using OKHTTP 4.10.0 to send requests from my Android App to my back-end. The problem raises when I add a 92MB file to my request. When I add this file, OKHTTP takes about 1min to send the request ...
FranKs's user avatar
  • 111
0 votes
1 answer
39 views

Request process request: url:http://host/test method: post body:{"token":"AAA"} if token is invalid respond: {"code":401,"msg":"unauth"} Now,I hope ...
卡尔斯路西法's user avatar
0 votes
0 answers
70 views

I want to change the URL of my request after it fails once. Let me elaborate... So if I made a call to www.abc.com/whatever and for some reason this call fails (maybe because of HTTP exception, ...
Anshul Tripathi's user avatar
1 vote
1 answer
71 views

I'm having trouble connecting to my API on Android 4.x devices after removing TLS 1.1 support. While updating the OkHttpClient configuration has been successful for devices with API level 21 and above,...
Rodrigo Salomao's user avatar
1 vote
0 answers
39 views

On first call ▼♦ ??{"value":[]}??☺??B?@D All subsequent calls are processed correctly {"value":[]} Request code Request request = new Request.Builder() .url(...
hnnssy's user avatar
  • 11
4 votes
1 answer
2k views

After upgrade to Spring Boot 3.4.0 from 3.3.x, I get an error Cannot resolve com.squareup.okhttp3:mockwebserver:unknown My project uses okhttp3.mockwebserver.MockWebServer and has the dependency <...
Honza Zidek's user avatar
0 votes
1 answer
109 views

I am working on a detecting data exfiltration for am android malware. I noticed it makes some post request to the server. I have downloaded the AOSP and modified the Request.java and HttpEngine.java (...
hashar mujahid's user avatar
0 votes
1 answer
73 views

I am facing an issue with the token refresh mechanism in my Android application using Retrofit and OkHttp. The following code is designed to intercept API requests, add an access token to the request ...
onyuuu's user avatar
  • 11
1 vote
1 answer
1k views

I have the following in my controller... @GetMapping("/openai/image") public String generate(@RequestParam(value = "message") String message) { ImageOptions options ...
Jackie's user avatar
  • 24k
0 votes
0 answers
76 views

My Java project uses okhttp3 version 4.2.0. I set callTimeout 400ms for client, but when I watch online server log, that request gets cancelled after 34606ms Btw, when this happens, the cpu load is ...
思远陈's user avatar
0 votes
1 answer
75 views

I'm facing an issue when using OkHttp3 with minifyEnabled (R8) in my Android app. With R8 enabled, I encounter the following runtime error: java.lang.IllegalStateException: Unexpected default trust ...
Javad's user avatar
  • 401
1 vote
0 answers
135 views

I use OkHttpClient as a WebSocket client. I set pinging every 10 seconds: private val okHttpClient = OkHttpClient.Builder() .pingInterval(10, TimeUnit.SECONDS) .readTimeout(30, TimeUnit....
faritowich's user avatar
2 votes
1 answer
127 views

I'd like to cache API request in my app so that user could see something even if they are offline. I also have a HeaderInterceptor with multiple headers, such as language such as en, es, fr etc... The ...
Biscuit's user avatar
  • 5,315
-1 votes
1 answer
166 views

previously i asked the question here, got some suggestions from @Rafael Winterhalter. i applied those changes but stuck with new error. this code is working with subclass but I want to replace all the ...
sam's user avatar
  • 226
1 vote
1 answer
139 views

Here's my code in isolation fun getMockServerUrl(): String { val server = MockWebServer() server.dispatcher = object : Dispatcher() { override fun dispatch(request: RecordedRequest): ...
theapache64's user avatar
  • 11.9k
1 vote
3 answers
133 views

I have created a Module for Network calls. It works well when tested on the same Project for all API methods. But When I add it as a dependency on another project it fails When a request is created. ...
Manoj's user avatar
  • 1,540
4 votes
1 answer
327 views

I am using Retrofit, OkHttp, Kotlin coroutines to make HTTP requests. When the server returns an unsuccessful result (e.g., 404), I throw a custom exception, which is a subtype of IOException. The ...
Geba's user avatar
  • 3,538
1 vote
0 answers
72 views

I am investigating an issue where Wi-Fi transfers between my android app and GoPro are inconsistent across different cellular network conditions. Initially, I noticed that GoPro Quik (Official GoPro ...
Pavlo Sharhan's user avatar
3 votes
0 answers
136 views

Lately I started getting an exception in production, where the app complains about a NullPointerException when trying to access an okhttp's Cookie instance. We can't reproduce it, and it's quite ...
Ricardo Costeira's user avatar
-1 votes
1 answer
80 views

I m training with http request via android client and a server, using Okhttp3 module. I already used get request with no problems, but when I try post request they don't reach the server. Using some ...
Alberto Palladipelo's user avatar
0 votes
1 answer
67 views

I created a client and a server to train my self with POST request. That was in java windows program, and I had no problem, it was fully functional. Now I m trying to create an android version to have ...
Alberto Palladipelo's user avatar
0 votes
1 answer
138 views

I am trying to get a Java application that uses okhttp to properly authenticate with the Optum API, as documented here. Although I can get a proper response from a test tool, I can not get a proper ...
Dale's user avatar
  • 5,997
1 vote
0 answers
66 views

I am new to Android and looking for some help. I am making a get request which returns a list as a string. For each entry in this list I want to add a card to a linearLayout in a horizontal scrollview ...
user27100319's user avatar
0 votes
0 answers
249 views

We recently updated our APIs with Java 21(Eclipse Temurin; open JDK) and with Spring Boot 3.3. And also enabled the virtual threads spring.threads.virtual.enabled=true After this, we continuously get ...
duak145's user avatar
0 votes
1 answer
70 views

When I run the Azure pipeline of my Android project to run the tests, during the test step two gradle tasks fail, compileDebugKotlin and compileReleaseKotlin, with the error in the title, pointing ...
Pedro Gonzalez's user avatar
1 vote
2 answers
1k views

I'm old-school and so have always just added jar files to the build path in Eclipse (4.26.0), but I want to modernize. Everything I see talks about maven, so I went into Window > Show View > ...
Dale's user avatar
  • 5,997

1
2 3 4 5
90