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
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!
Can you please tell me which is the first page that he is writing the request code. Is it a new controller or what?
Very nice demonstration with good handling of variable & resources.
It's a wonderful video for basic knowledge of json api call and it will work.
Outstanding! I looked all over for just this kind of tutorial. Thanks a ton!
Thanks, You really made it very simple and easy to understand. Much thanks!
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
Easier than it is impossible .. Great Video
Superlike to this video thanks a lot
Thank your very much sir
Simple and very clear explain
give me clear perspective about get and post in API, thank you sir!!
Perfectly explained my man
Worked like a charm!!! Thanks so much!!
Great explanation
This was very helpful. Thanks
Thank you for the video! Very easy to follow and my code worked!
Very nice and easy video my friend!
Perfectly explained
Great explanation
Tq sir very helpful....
Excelent video, thanks
superb explanation brother 👍
Good one... To the point!!!
Great one
Thanks for your help!
Thanks alot for your help
Thanks for sharing.
Tutorial definitely not for people new to c# but it's worth watching as an introduction to API's
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.
well explained !
just what I needed!
This video is very useful thank you
Thanks
Thanks man for making this video, it got my long time cut to short.
Awesome explanation bro it's nice
Thanks.. its really helpful .
Excellent Demonstration thank you this helped me lot
Thank you so much!!
This is beautiful, than you sir !
Great help me alot
This is great. Although, I have a question.
Can we pass parameters as argument while getting data from an API call?
God bless You!
This helped a lot thanks!
Thanks a lot
Would this code support 'RESTFUL' API Calls ?
Which visual studio template should i use for this?
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.
Thank you so much
hi i am a newbie, to start which template shall i create?
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 ?
Excellent video. Question, how can I make the same using XML instead of JSON?
Thanks :)!
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 .?
How to do the same to access an API that has a token based Authentication (vcenter)? Would be a great help. Thanks
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.
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.
Hello i am getting an error when i tried this code "The remote server returned an error: (400) Bad Request." what do i do?
What if the Api returns HTML and we want that HTML as json payload, I am getting error from hitting the website api
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
Thanks But please do not keep zooming it.We can see the text. It is very distracting and annoying.
I make conector to akeneo pim, and this video help me
thanks
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
with this post code does it post data to that free api ??
Can you make the one using copy leaks api
Im having problems connecting to it
Hi Sir I am getting a blank page what to do??
Sir I need help from you...
How to create default.aspx.cs file? I have VS 2017 adn can't see it, am I missing something?
Nvm I had different project without :Page
can we call salesforce API this way...??? pls can someone tell
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!
Hi Naga,
Did you figure out how to call API using HTTPClient?
This sort of video doesnt work in 480p
q cara bom
Very good tutorial unfortunately not working for me
Can we also call web services by this way
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.
My like was number was 404. Sadly... was not found.
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
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?