Nice simple example. Shows me the basics of HttpClient and also how to make a console application async. Is there a part 2 where you store the response in a class?
Great tutorial! I have a question though. I'm looking to authenticate when making a GET call to an API. I'll need to include a key, a secret and a nonce. is it also possible to add these to an API URL?
@ Ian: Thanks for the great video! Question though - can you also put the HttpClient object initialization within the async GetToDoItems() Method? Would that be a better place to put the class declartaion of HttpClient since it only lives within that scope?
Thats a good question. The main reason why is so that we can tell our code to wait while it performs a function. In this case it is getting data from the internet and since we don't know how long that will take, we want to make sure our code waits long enough for it to get the result. For more info check out this link, it goes over it very well: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/
Perfect and straightforward. Will watch more. Thanks
Thank you for posting this, your example is clear, direct and short. It helped me a lot.
I guess Im pretty off topic but does anybody know of a good place to watch newly released tv shows online?
@Landyn Kaden Flixportal =)
@Beau Jerry thank you, signed up and it seems to work :) I appreciate it !!
@Landyn Kaden You are welcome xD
Finally!! Something simple and understandable. Thanks!!
Finally a nice video, thank you
Thanks Ian, very helpful.
keep this shit going g, really helpful
Supper sir.. how can I include header parameters with key and value in the code
Nice simple example. Shows me the basics of HttpClient and also how to make a console application async. Is there a part 2 where you store the response in a class?
Yes sir here is the link: ua-cam.com/video/xkB-cIMjXGQ/v-deo.html
It very good to see and clear
thank goodness for this video
Works like a charm!
it doesn't run for me something to do with program
Great tutorial! I have a question though. I'm looking to authenticate when making a GET call to an API. I'll need to include a key, a secret and a nonce. is it also possible to add these to an API URL?
Yes, if those are Query string parameters then you can add them to the URL. Check the documentation of the API you are trying to hit to make sure.
Thank you for the help.
@ Ian:
Thanks for the great video! Question though - can you also put the HttpClient object initialization within the async GetToDoItems() Method? Would that be a better place to put the class declartaion of HttpClient since it only lives within that scope?
No, you initialize the HttpClient where he did. Otherwise it can cause errors, according to the docs.
You are in the same class. You do not need to create a new Program object inside of the Program class.
Anybody else getting a response only some of the time when running the application?
Why do you need to make this app async?
Thats a good question. The main reason why is so that we can tell our code to wait while it performs a function. In this case it is getting data from the internet and since we don't know how long that will take, we want to make sure our code waits long enough for it to get the result. For more info check out this link, it goes over it very well: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/
@@ianschoenrock2285 Thank you!
Too many mistakes