Skip to content
0:00 / 0:00

#ktor#restapi#kotlinx.serialization

How to Build a Simple REST API With Ktor + Android App

Philipp Lackner

261K subscribers • 7 videos on Hallway

YouTube

Beginner. No background in the topic needed.

71K views5 years ago1 recommendation

Web developmentMobile developmentKotlinAPI designAndroid and Jetpack Compose

Philipp Lackner demonstrates how to build a backend REST API using Ktor and connect it to an Android application.

Building a REST API in Kotlin made easy. Learn it in this video. Find my Ktor courses here (15% off with discount code KTOR_LOVERS): pl-coding.com/premium-courses?utm_source=youtube&utm_medium=… 💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future: elopage.com/s/philipplackner/code-review/payment?locale=en 🎓 Become an industry-ready developer in the Mobile Dev Campus: pl-coding.com/campus?utm_source=youtube&utm_medium=video&utm… 🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture": pl-coding.com/best-practice-guide?utm_source=youtube&utm_med… Read our weekly Android blog: pl-coding.com/blog Join this channel to get access to perks: youtube.com/channel/UCKNTZMRHPLXfqlbdOI7mCkg/join Initial app source code: github.com/philipplackner/RabbitsApp Final app source code: github.com/philipplackner/RabbitsApp/tree/app Ktor backend source code: github.com/philipplackner/ktor-rabbits Regular live codings on Twitch: twitch.tv/philipplackner Join my Discord server: discord.gg/cwQbmUstEu Regular programming advice on my Instagram page: instagram.com/_philipplackner_ Checkout my GitHub: github.com/philipplackner You like my free content? Here you can buy me a coffee: buymeacoffee.com/philipplackner - What we will build - Generating the Ktor project - Exploring & setting up the Ktor project - Random rabbit route - Setting up Retrofit - AppModule - MainViewModel - RabbitApp - Setting up the UI - Where you can learn more about Ktor

Why it's here

1 person recommends this

What people say. Recommended as a great single-shot tutorial for getting started with Ktor server-side development.

u/areyousakethin r/Kotlin • Recommends

On “Where did you learn ktor from?”

Documentation is perfect imo. You can also check out Nate's yt playlist (has only 2 videos as of now but pretty good to start) or Phillip's single shot tutorial for getting started and the official Kotlin channel have few tutorials around ktor and there are also few talks around ktor on yt which may help you to get started:)

u/naarmein r/Kotlin • Mentions

Ktor server responds with HTML with kotlin object inside pre tag instead of JSON I'm following Philipp Lackner's tutorial - [video to learn Ktor server-side development. I followed all the steps in the video as said ( installed ContentNegotiation with json(), ie: kotlinx.serialization as serializer, and annotated the data class with @Serializable). To respond to a get request in a route, I called call.respond(dataClassObject). But I get the response as HTML instead of JSON. Why is this happening? Did I miss something? I guess ktor has changed quite a bit since this tutorial was released. Thanks in advance for the help.