In my app is used send request by https by following this source answer. Now some of them apache methods deprecated. Can anyone help me in order solve in a new approach?
To avoid using deprecated methods in API connectivity, think about using Retrofit. It's a third party library which makes HTTP communication much simpler.
When using Retrofit, you can create an interface of an API endpoint and the use it like a method. The rest of the HTTP request is managed by the library.
Here is the link to the Retrofit github homepage: http://square.github.io/retrofit/