All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.baulsupp.oksocial.output.Response.kt Maven / Gradle / Ivy

There is a newer version: 4.19.0
Show newest version
package com.baulsupp.oksocial.output

import okio.Buffer
import okio.BufferedSource
import okio.ByteString

data class SimpleResponse(val mimeType: String? = null, val source: ByteString = ByteString.EMPTY, val filename: String? = null)

object SimpleResponseExtractor : ResponseExtractor {
  override fun mimeType(response: SimpleResponse): String? = response.mimeType

  override fun source(response: SimpleResponse): BufferedSource = Buffer().apply { write(response.source) }

  override fun filename(response: SimpleResponse): String? = response.filename
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy