Registry / http-client / retrofit

retrofit

JSON →
library3.0.0javamavenunverified

Retrofit is a type-safe HTTP client for Android and Java, simplifying REST API communication through annotation-based interface definitions.

<dependency> <groupId>com.squareup.retrofit2</groupId> <artifactId>retrofit</artifactId> <version>3.0.0</version> </dependency>
INSTALL
IMPORT
SIG · RETROFIT
R
retrofit
http-clientjavav3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Retrofit
retrofit2.Retrofit

Creates a Retrofit instance and defines a REST API interface.

import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.http.GET; interface ApiService { @GET("users/{id}") retrofit2.Call<User> getUser(@retrofit2.http.Path("id") int id); } public class RetrofitExample { public static void main(String[] args) { Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.example.com/") .addConverterFactory(GsonConverterFactory.create()) .build(); ApiService service = retrofit.create(ApiService.class); } }
Debug
Known issues
breakingRetrofit 3.0.0 requires Java 11+ and may have breaking changes from 2.x, including package restructuring.
fix
Update imports from retrofit2 to retrofit (new package) and check for API changes in call adapters and converters.
affects: >=3.0.0
Upgrade
Version history
3.0.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
32
Resources
retrofit — mvn dependency:get retrofit · libregistry