Hi , attach screenshot is response of some api to get image , my question is how to parse this response and display it in imageview thanks
response header for Content-Type is application/octet-stream
i tried this but i does not work though it return bytes but bitmap val is null
Copy code
@GET("users/profile/photo")
suspend fun getProfilePhoto(@Header("Authorization") authorization: String ): ResponseBody
val response = getClient().getProfilePhoto()
val bytes: ByteArray = response.bytes()
val bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.size)
Glide.with(this@MainActivity).load(bitmap).into(image)