HTTP Requests in Kotlin with a Ktor Client and Kotlinx Serialization

Поділитися
Вставка
  • Опубліковано 6 жов 2024

КОМЕНТАРІ • 42

  • @ldickmanns
    @ldickmanns  2 роки тому +2

    Checkout the code here: github.com/ldickmanns/GeekJokesKtorClient

  • @OnichanDeez
    @OnichanDeez Рік тому +2

    You say what you're going to do. Then you proceed to explain and do it properly! Loved it. Subscribed!

  • @rezazeraati1436
    @rezazeraati1436 2 роки тому +2

    Thank you Sir. it was very easy explaining and understandable. pleeease make a complete tutorial over ktor, thank you again

    • @ldickmanns
      @ldickmanns  2 роки тому

      Sure! Do you mean a video on also the server side or a more in depth video on the client side?

  • @alfredlotsu950
    @alfredlotsu950 2 роки тому +2

    Your tutorial is awesome, subscribed!

  • @rezazeraati1436
    @rezazeraati1436 2 роки тому +2

    Man. please. I'm checking this page everyday to see if you answered🙂. please explain URL manipulation with Ktor. thanks🌹

    • @ldickmanns
      @ldickmanns  2 роки тому +1

      Thanks for the suggestion! :) will have a look at that

  • @manfredbirkholz3832
    @manfredbirkholz3832 4 місяці тому

    Thanks a lot for the nice tutorial!

  • @richardwatkins6725
    @richardwatkins6725 2 роки тому +2

    great tutorial.

  • @per9022
    @per9022 Рік тому +2

    Вот это я понимаю туториал. За 6 минут объяснил все что нужно для новичков.

    • @zcv3224
      @zcv3224 Рік тому

      вот только на момент выхода этого туториала версия ktor была уже устаревшей

  • @Mohamedali-li2ex
    @Mohamedali-li2ex 2 роки тому +2

    Nice explanation

  • @andromadusnaruto1544
    @andromadusnaruto1544 2 роки тому +2

    Nice and concise... 👍🏽

  • @alfredlotsu950
    @alfredlotsu950 2 роки тому +1

    I know this is off topic but your computer is blazing fast!

    • @ldickmanns
      @ldickmanns  2 роки тому

      It’s actually “just” an Intel MacBook Pro. So no M1 :D

  • @pureheroin9902
    @pureheroin9902 2 роки тому +3

    "we won't run any tests"
    My kinda programming

    • @ldickmanns
      @ldickmanns  2 роки тому +1

      Of course, only for the purpose of the video ;)

  • @rezazeraati1436
    @rezazeraati1436 2 роки тому +2

    Dear guy, please explain how can we do URL manipulation and make our endpoint dynamic, like we do in retrofit. I didn't see these in the documentation

    • @ldickmanns
      @ldickmanns  2 роки тому +1

      Thanks for the suggestion! You mean having a service that can access multiple different API endpoints, right?

    • @rezazeraati1436
      @rezazeraati1436 2 роки тому

      @@ldickmanns kind of yes. in android. when for example we have a long list of movies and we need different calls for getting the details of the specific movie that we clicked on. thanks

  • @michaberkowicz8239
    @michaberkowicz8239 2 роки тому

    We need to install Client ContentNegotiation instead of JsonFeature in current version of Ktor

  • @ethiomusic3158
    @ethiomusic3158 2 роки тому +1

    How do I make "Rate Us" and "Send App" in Kotlin language?... I did it in many ways but it doesn't go directly to Google Play Store.... I need help guys!... Right code in fragment... I hope many of you did it if you are app developers by Kotlin

    • @ldickmanns
      @ldickmanns  2 роки тому

      Actually I didn’t do that before, but with a quick google search I found this: stackoverflow.com/questions/12998268/how-to-implement-rate-us-in-android
      Does that help you?

  • @rezazeraati1436
    @rezazeraati1436 2 роки тому +1

    please explain in Android Studio environment🌷

    • @ldickmanns
      @ldickmanns  2 роки тому +1

      So a video on how to use Ktor in an Android app you mean?

    • @rezazeraati1436
      @rezazeraati1436 2 роки тому

      @@ldickmanns yes. and how we can dynamically change the endpoint of our API for example when making a movie app, and we want to get the detail of a movie that we clicked on. I mean the URL manipulation that we do by retrofit. I can't do that with KTOR. there must be a way to do that with KTOR also. thank you

    • @rezazeraati1436
      @rezazeraati1436 2 роки тому

      for example we have a card that is a movie that we get from our API, and now we want to make a new request and get the download links of the specific movie that we clicked on. I do this with retrofit and Gson, but there is a lot of code. KTOR with serialization make the code a lot shorter. I like to know how to do it by KTOR. thank you very much🌹

    • @rezazeraati1436
      @rezazeraati1436 2 роки тому

      I just say the movie for just saying an example. I just want to learn making different requests on a list that we make by a LazyColumn or LazyRow. so then I can work with APIs easier with less code and a new and better way.🌺

  • @footballCartoon91
    @footballCartoon91 8 місяців тому

    Nowadays, ktor uses "ContentNegotiation" instead. How to go about this way.

  • @thourayasboui376
    @thourayasboui376 2 роки тому +1

    hi, and if we add request = Request.Builder() .url().addHeader("Accept", "application/json") .addHeader().header().post(postBody.toRequestBody(mediaType)).build() before the HTTP-Client section please. what we are doing? are we calling the server?? or sending some parameters to the servers? thanks.

    • @ldickmanns
      @ldickmanns  2 роки тому

      Where did you find that code?
      At first glance, it looks like you’re just building a request using the builder pattern :)

  • @pritamdas1156
    @pritamdas1156 2 роки тому +1

    how to make request withCredentials = true

  • @mouhamadbourouba5382
    @mouhamadbourouba5382 2 роки тому

    can i do this inside Ktor Api