Akka-http: Add Java API to create custom MediaTypes

Created on 9 May 2018  路  2Comments  路  Source: akka/akka-http

As discussed in https://discuss.lightbend.com/t/akka-http-java-api-need-to-create-a-contenttype-from-a-string-mime-type/957 we discovered that one of the Scala APIs is missing for the Java one.

private val custom: MediaType.Binary = MediaType.customBinary("application", "wat", MediaType.Compressible)
private val binary = ContentType(custom)
println(s"binary = ${binary}")

To ease Java API users, we should have the same APIs available for both languages.

help wanted 3 - in progress java core

All 2 comments

Thanks :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlprat picture jlprat  路  6Comments

ugdark picture ugdark  路  5Comments

fmeriaux picture fmeriaux  路  4Comments

jrudolph picture jrudolph  路  3Comments

jrudolph picture jrudolph  路  6Comments