I’m trying to enable public key pinning since I don’t want to release updates for every certificate renewal provided I’ll use the same CSR every time. I generated the hash with this script. #!/bin/bash certs=`openssl s_client -servername $1 -host $1 -port 443 -showcerts </dev/null 2>/dev/null | sed -n ‘/Certificate chain/,/Server certificate/p’` rest=$certs while [[ "$rest" ..
Category : okhttp
I want to do a simple PUT request in android studio using okhttp3. I know how to do GET requests. Below is the code which I have used to do GET request. public simplifYText(String question){ OkHttpClient client = new OkHttpClient(); String url = "http://vivekmishra01.pythonanywhere.com/"; Request request = new Request.Builder() .url(url) .build(); client.newCall(request).enqueue(new Callback() { @Override ..

Stetho and Google Chrome DevTools have become unusable after a macOS update (I doubt that macOS update is the origin of this bug, but I prefer to mention it). Here is the appearance of DevTools after the open of "inspect mode" on a device (provided by Facebook Stetho library for Android & OKHttp). There are ..
Title says it all. How should I go about sending a file to a remote server given remoteHost, remoteUsername, remotePassword and remoteDestination (as String). How should I setup OkHttp3 code? Source: Android..
Solution Tried : 1. Upgraded Okhttp library’s version 2. Downgraded OkHttp library’s version in both scenario app was crashing so now version is set to 4.9.0 and now app is not getting crashed but issue is that api is not getting called. Source: Android..
I’m making an Adnroid app that sends API request on button click using OkHTTP However I’ve got this error in this line https://prnt.sc/10bbg1f https://prnt.sc/10bbgba Can you please let me know what’s wrong with it? package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import com.squareup.okhttp.Call; import com.squareup.okhttp.Callback; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import java.io.IOException; public ..
Good afternoon I’m using okhttp to carry out my requests in a generic way, I would like to ask for your help in how I could retrieve the return information, if someone has a specific project or example I would appreciate it I don’t have much experience in Java I understand that the asynchronous call ..
I am using a webview to display multiple cameras (along with other data) via a single html page. The issue is that MJPEG streams with basic or digest authentication will not work when embedded using a standard IMG tag. For Jpeg stills, this is easy enough to fix using shouldInterceptRequest and then making the actual ..
I am using a webview to display multiple cameras (along with other data) via a single html page. The issue is that MJPEG streams with basic or digest authentication will not work when embedded using a standard IMG tag. For Jpeg stills, this is easy enough to fix using shouldInterceptRequest and then making the actual ..
I’m using the code below to send and receive Network requests with OkHttp. How can I know if the request is successfully sent before getting the response? I want to add for example a trace to know that request is successfully sent and that I’m waiting now for the response. val client = OkHttpClient() val ..
Recent Comments