# Band-aiding legacy networking libraries with Retrofit and OkHttp

DevFeed: [Band-aiding legacy networking libraries with Retrofit and OkHttp](<https://devfeed.tech/articles/band-aiding-legacy-networking-libraries-with-retrofit-and-okhttp-29035.md>)

Original publisher: [Read original article](<https://saket.me/retrofit-band-aid/>)

Author: Saket Narayan

Published: 2018-04-30T09:22:05Z

Content type: tutorial

Language: en

Sources: [Saket Narayan](<https://devfeed.tech/sources/saket-narayan.md>)

Topics: [legacy](<https://devfeed.tech/topics/legacy.md>), [networking](<https://devfeed.tech/topics/networking.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Library](<https://devfeed.tech/topics/library.md>), [API](<https://devfeed.tech/topics/api.md>), [MQTT](<https://devfeed.tech/topics/mqtt.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apis](<https://devfeed.tech/tags/apis.md>), [http](<https://devfeed.tech/tags/http.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [networking](<https://devfeed.tech/tags/networking.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [refactor](<https://devfeed.tech/tags/refactor.md>), [retrofit](<https://devfeed.tech/tags/retrofit.md>)

## AI overview

This tutorial explains how to use Retrofit with a legacy networking library by adding an OkHttp interceptor that redirects network requests to the existing library. It also describes exposing nonstandard data sources through Retrofit converters.

## Source excerpt

When Uncommon was brought in to refactor a big legacy app last year, we found ourselves in a strange situation. Our client was maintaining a common library for handling networking -- HTTP, FCM, MQTT -- across all apps under their brand. This library (let's call it SadLibrary) had an API that was badly designed and dated, but not using [...] The post Band-aiding legacy networking libraries with Retrofit and OkHttp appeared first on Saket Narayan.