Skip to content

Tag: okhttp

Sending data from android to esp8266

I have an arduino project, where i was able to set up an esp8266 as a webserver, and i am able to send data to it, eg. if i put “http://192.168.4.1/get?data=010” into the browser, it works perfectly. I want to send data using an android app, which pretty much means using the above mentioned url, j…

https proxy using okhttp3

I am using okhttp3 and trying to see how do I pass userId & pswd to authenticate with proxy server that accepts only HTTPS protocol. I already saw exmaple over SO & on other sites(link below) but they don’t have HTTPS protocol. https://botproxy.net/docs/how-to/okhttpclient-proxy-authentication-h…

How to auto refresh data in android studio every second?

I am new to android studio, I am making an app that gets the json of a field in thingspeak, but I don’t know how can I make an auto refresh to the data I get every second. Can you please help me? Answer I found a solution finally, I placed the data request inside the following code and it

Exchange cookies between requests in OkHttp

I’m trying to scrape one website, and for that, I need to exchange the cookies and headers between all the requests. The question is the following: how can I achieve such behaviour in a smart way, not by resetting the cookies and headers manually between the Request and Response objects each time? Answe…