You Are Using HttpClient Wrong

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии • 37

  • @alexandernava9275
    @alexandernava9275 Год назад +6

    Yes factory would be amazing! Also a more over head how factories work/common practices would be amazing.

  • @viorelbuliga1107
    @viorelbuliga1107 Год назад +4

    Valuable video! Looking forward to see the video about IHttpClientFactory.

  • @farhadsu
    @farhadsu Год назад +4

    Please, do the video about IHttpClientFactory...

  • @alexkanunnikov4908
    @alexkanunnikov4908 Год назад +3

    Please, do the video about IHttpClientFactory)))

  • @DeepWorksStudios
    @DeepWorksStudios Год назад +3

    Thank you for this valuable content :)
    Keep it up!

  • @williamliu8985
    @williamliu8985 Год назад +1

    Thanks for sharing! Should I use the AddHttpClient extension? or use HttpClientFactory inject in service?

    • @Codewrinkles
      @Codewrinkles  Год назад +2

      Those go hand in hand. I will do the video on IHttpClientFactory :)

    • @user-dc9zo7ek5j
      @user-dc9zo7ek5j Год назад

      .AddHttpClient allows you to use IHttpClientFactory, and if I'm not mistaken, there isn't any other way to configure it, because the default class (DefaultHttpClientFactory) is internal. Of course you can roll your own and register it, but I don't see any reason.

  • @RudyRdx
    @RudyRdx Год назад +4

    thankyou, pls do the video !!

  • @alexmel8448
    @alexmel8448 Год назад

    why is bad to have much open connections
    ?

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      I have explained it during the video. The connections are kept open for a long time, depending on the MSL. If you have an app with heavy load, at a certain point you won't have any sockets available for new connections. It's called socket exhaustion and it's a very common problem in production apps that don't use the HttpClient correctly.

    • @alexmel8448
      @alexmel8448 Год назад

      @@Codewrinkles Thanks

  • @danielvanderstelt
    @danielvanderstelt Год назад

    I dont know on which video to post it so here it goes.
    In many of your videos I saw EF sql queries neatly logged on your console.
    I cannot seem to get it in a nice and clear way.
    In the source I cannot find it configured. So ...
    Maybe a hint on that?😊
    ( and yes to httpfactory video )

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      Hey, thanks for getting in touch.
      The thing is, I haven't configured anything. I think it's the default at the queries are logged by EF Core.
      As you are a new member, please also consider joinning our Discord community.We have a lot of nice discussions there, regular hangouts and there is a bunch of very nice guys there.

  • @alexmidnayt159
    @alexmidnayt159 Год назад

    we need that video about IHttpClient!))))

  • @luis1118
    @luis1118 Год назад

    Thanks

  • @rorysanchez
    @rorysanchez Год назад +1

    Ihttpclientfactory pretty please!

  • @zimcoder
    @zimcoder Год назад +1

    What click baity title, I'm using the factory already

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      Clickbaity or not, but how are you using IHttpClientFactory in .NET Framework apps? I think this video contains some very valuable and explicit information about potential problems that people might face if they don't know how exactly things happen under the hood of the HttpClient.

    • @FreaksSpeaks
      @FreaksSpeaks Год назад

      I use factory as well, but I learned more how httpclient works. Thanks.

    • @user-dc9zo7ek5j
      @user-dc9zo7ek5j Год назад

      @@Codewrinkles He has a point, when I read the titles I expect something that almost everybody misuses.

  • @FreemanFromSteppe
    @FreemanFromSteppe Год назад

    thank you!

  • @alexmel8448
    @alexmel8448 Год назад

    can you explain how to use "netstat | find" I try But I did not succeed

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      well, it's not that complicated. it's netstat | fubd "{the string you are looking for}". In my case I have run netstat previously and noticed that the connection from my console app have my computer name and port so I placed that as my search term. to reproduce this, just run netstat and look into all the connections. Then you'll know what you want to filter on.

    • @alexmel8448
      @alexmel8448 Год назад

      @@Codewrinkles thanks

  • @alexmel8448
    @alexmel8448 Год назад +7

    Please, do the video about IHttpClientFactory)))