You Are Using HttpClient Wrong

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 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.

  • @DeepWorksStudios
    @DeepWorksStudios ปีที่แล้ว +3

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

  • @farhadsu
    @farhadsu ปีที่แล้ว +4

    Please, do the video about IHttpClientFactory...

  • @alexkanunnikov4908
    @alexkanunnikov4908 ปีที่แล้ว +3

    Please, do the video about IHttpClientFactory)))

  • @RudyRdx
    @RudyRdx ปีที่แล้ว +4

    thankyou, pls do the video !!

  • @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.

  • @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.

  • @luis1118
    @luis1118 ปีที่แล้ว

    Thanks

  • @alexmidnayt159
    @alexmidnayt159 ปีที่แล้ว

    we need that video about IHttpClient!))))

  • @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

  • @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)))

    • @Codewrinkles
      @Codewrinkles  ปีที่แล้ว +1

      Noted. Thanks for watching