android how can i send a null value to a server in retrifit 2?

I found the solution. Need to add to retrofit builder this

val retrofit = Retrofit.Builder() .baseUrl(DIRECTORY_URL) .client(client) .addConverterFactory(GsonConverterFactory.create(GsonBuilder().serializeNulls().create())) .build()

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top