How to Call External API in C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024
  • In this tutorial, we will see how to call a external API from C# code.
    We will take an free sample API.
    We will see :
    1. How to make a GET request from C#
    2. How to make a POST request from C#
    3. How to pass credentials to API from inside the C# code.
    #C# API

ความคิดเห็น • 79

  • @nagadinesh7994
    @nagadinesh7994 5 ปีที่แล้ว +10

    I browsed many sites on how to make a call to a API, but just couldn't get it right. This video worked just fine for me. Thank you so much!

    • @naveenpatils2277
      @naveenpatils2277 2 ปีที่แล้ว

      Can you please tell me which is the first page that he is writing the request code. Is it a new controller or what?

  • @VijayKumar-yi7nt
    @VijayKumar-yi7nt 3 ปีที่แล้ว +2

    Very nice demonstration with good handling of variable & resources.

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

    It's a wonderful video for basic knowledge of json api call and it will work.

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

    Outstanding! I looked all over for just this kind of tutorial. Thanks a ton!

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

    Thanks, You really made it very simple and easy to understand. Much thanks!

  • @MessingWithCode
    @MessingWithCode 2 ปีที่แล้ว

    hey i love you and i do not understand how you have such an small amount of likes you deserve a tone more thanks a lot and greattings from Dominican Republic

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

    Easier than it is impossible .. Great Video

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

    Superlike to this video thanks a lot

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

    Thank your very much sir
    Simple and very clear explain

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

    give me clear perspective about get and post in API, thank you sir!!

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

    Perfectly explained my man

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

    Worked like a charm!!! Thanks so much!!

  • @navalbhatt540
    @navalbhatt540 2 ปีที่แล้ว

    Great explanation

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

    This was very helpful. Thanks

  • @justbean7451
    @justbean7451 2 ปีที่แล้ว

    Thank you for the video! Very easy to follow and my code worked!

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

    Very nice and easy video my friend!

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

    Perfectly explained

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

    Great explanation
    Tq sir very helpful....

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

    Excelent video, thanks

  • @yogeshns
    @yogeshns 2 ปีที่แล้ว

    superb explanation brother 👍

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

    Good one... To the point!!!

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

    Great one

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

    Thanks for your help!

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

    Thanks alot for your help

  • @sahil-f1k3t
    @sahil-f1k3t 4 ปีที่แล้ว +1

    Thanks for sharing.

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

    Tutorial definitely not for people new to c# but it's worth watching as an introduction to API's

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

      Ye but it is not hard to understand at all. I am learning c# maximally 2 months with 0 knowledge from other languages and when i learned basics of OOP it is not hard to understand. After 2 months i think i am still new but i dont know how is it in programming languages.

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

    well explained !

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

    just what I needed!

  • @ahmedkoubesy7458
    @ahmedkoubesy7458 5 ปีที่แล้ว +2

    This video is very useful thank you

  • @nikhilsharma2982
    @nikhilsharma2982 5 ปีที่แล้ว +2

    Thanks man for making this video, it got my long time cut to short.

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

    Awesome explanation bro it's nice

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

    Thanks.. its really helpful .

  • @venubvijayanna807
    @venubvijayanna807 5 ปีที่แล้ว +2

    Excellent Demonstration thank you this helped me lot

  • @7gugts3d4ROBOTufyuguhihimpl9
    @7gugts3d4ROBOTufyuguhihimpl9 2 ปีที่แล้ว +1

    Thank you so much!!

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

    This is beautiful, than you sir !

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

    Great help me alot

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

    This is great. Although, I have a question.
    Can we pass parameters as argument while getting data from an API call?

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

    God bless You!

  • @rukshanhassim5444
    @rukshanhassim5444 5 ปีที่แล้ว +2

    This helped a lot thanks!

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

    Thanks a lot

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

    Would this code support 'RESTFUL' API Calls ?

  • @sameerjain9202
    @sameerjain9202 2 ปีที่แล้ว

    Which visual studio template should i use for this?

  • @ArunYadav-gq6wr
    @ArunYadav-gq6wr 4 ปีที่แล้ว +1

    This helped me alot but my requirements is to lanch a chrome browser and call the api and a webpage will open where need to enter data then after that it will send the response back. How can I achieve this? Thanks in advance.

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

    Thank you so much

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

    hi i am a newbie, to start which template shall i create?

  • @btkautomotive
    @btkautomotive 2 ปีที่แล้ว

    Bro… i have 2 columns in sql table. I need to collect the data in those 2 columns using Azure API call in c#. Can you tell me how can i do it ?

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

    Excellent video. Question, how can I make the same using XML instead of JSON?

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

    Thanks :)!

  • @tanzeelabbasi118
    @tanzeelabbasi118 3 ปีที่แล้ว

    hello dude, there's occur a issue that is " Cannot send a content-body with this verb-type. " after post method.. what should be do .?

  • @Abedin8
    @Abedin8 5 ปีที่แล้ว

    How to do the same to access an API that has a token based Authentication (vcenter)? Would be a great help. Thanks

  • @pravinbhojane89
    @pravinbhojane89 4 ปีที่แล้ว

    Hello sir, can you share a video how to send a data to same API from database and update response from API against same record which we have passed to client API.

  • @jagdishjoshi3875
    @jagdishjoshi3875 5 ปีที่แล้ว

    Sir, I followed the same process which you show on the videos .. it is working fine also at my end. but i have to debug my Service Code . but debugger does 't move on the service method . please make me explain how can i do this. i am waiting of positive response your side.. if it will possible do get back answer of my this query . because i am facing this problem on my company project.

  • @insiyahkanchwala2861
    @insiyahkanchwala2861 3 ปีที่แล้ว

    Hello i am getting an error when i tried this code "The remote server returned an error: (400) Bad Request." what do i do?

  • @swastikamishravlogs
    @swastikamishravlogs 4 ปีที่แล้ว

    What if the Api returns HTML and we want that HTML as json payload, I am getting error from hitting the website api

  • @olaniyijesutofunmi423
    @olaniyijesutofunmi423 4 ปีที่แล้ว

    Hello,
    Thank you so much for the tutorial. I am unable to view my results as you have done. My code is exactly the same as yours. I am using Visual Studio version 16.5.0

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

    Thanks But please do not keep zooming it.We can see the text. It is very distracting and annoying.

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

    I make conector to akeneo pim, and this video help me
    thanks

  • @sandeep-4433
    @sandeep-4433 4 ปีที่แล้ว

    Hello sir,
    Could you please tell me , how to get token back in C# application by passing credentials to api. and again getting result from API

  • @gauravdessai8783
    @gauravdessai8783 5 ปีที่แล้ว

    with this post code does it post data to that free api ??

  • @eveslime99
    @eveslime99 4 ปีที่แล้ว

    Can you make the one using copy leaks api
    Im having problems connecting to it

  • @anubhavsrivastava6624
    @anubhavsrivastava6624 4 ปีที่แล้ว

    Hi Sir I am getting a blank page what to do??

  • @mohammedakram1351
    @mohammedakram1351 3 ปีที่แล้ว

    Sir I need help from you...

  • @matys3693
    @matys3693 5 ปีที่แล้ว

    How to create default.aspx.cs file? I have VS 2017 adn can't see it, am I missing something?

    • @matys3693
      @matys3693 5 ปีที่แล้ว

      Nvm I had different project without :Page

  • @ashishshukla6932
    @ashishshukla6932 3 ปีที่แล้ว

    can we call salesforce API this way...??? pls can someone tell

  • @nagadinesh7994
    @nagadinesh7994 5 ปีที่แล้ว +2

    Also can you a make a video on how to make use of HTTPClient class to make API calls or get me a good pointer for the same. Thanks in Advance!

    • @NazmulHasan-tm5ly
      @NazmulHasan-tm5ly 4 ปีที่แล้ว

      Hi Naga,
      Did you figure out how to call API using HTTPClient?

  • @Drengen10
    @Drengen10 2 ปีที่แล้ว

    This sort of video doesnt work in 480p

  • @1gatti
    @1gatti 3 ปีที่แล้ว

    q cara bom

  • @caroav2671
    @caroav2671 5 ปีที่แล้ว

    Very good tutorial unfortunately not working for me

  • @Ravi-ws3qb
    @Ravi-ws3qb 5 ปีที่แล้ว

    Can we also call web services by this way

    • @TechieOcean
      @TechieOcean  5 ปีที่แล้ว

      Hi Ravi,
      For .NET webservices, we have different approaches. we can use the proxy class of the webservice in our client project to call the web service methods using that proxy class. Second we add the web reference to the url of the web service and then call the web methods by making the instance of the web service classes.

  • @darkangelhell6667
    @darkangelhell6667 4 ปีที่แล้ว

    My like was number was 404. Sadly... was not found.

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

    not for rookies.. taking to many leaps, which assumes you know a lot of about the steps taken.. missing a lot of detailed explanations if you want to use as a tutorial

  • @munnaalexander4889
    @munnaalexander4889 3 ปีที่แล้ว

    Hi,
    Thanks a lot for the tutorial.
    I'm getting the errors below
    jdoodle.cs(36,0): error CS1525: Unexpected symbol `string'
    jdoodle.cs(43,28): error CS1530: Keyword `new' is not allowed on namespace elements
    jdoodle.cs(43,31): error CS1525: Unexpected symbol `StreamWriter'
    Can anyone help?