Computer scienceProgramming languagesKotlinAdditional instrumentsAdditional librariesCommunications and Networks

Retrofit

Create a new person

Report a typo

We are coding our client with Retrofit, and we have a function to make a request with an Authorization Bearer token: suspend fun create(token: String, user: PersonDto). The result is a PersonDto in the endpoint: api/users. Please complete with the correct annotation to perform the operation.

@POST("api/users")
suspend fun create(/*write your code*/ token: String, @Body person: PersonDto): Response<PersonDto>
Enter a short text

Create a free account to access the full topic