I am trying to learn C++ after years using Python, PHP and JavaScript. I know this is C code but would it be any different if done in C++? Also why doesn’t C++ have much info on restful API calls?
Hi there, thank you for the info! Do you know if there is the posibility to show a loading state? For example in the UI I would like to show a loader and disable a button while the request resolves.
I'm getting expected ‘const char *’ but argument is of type ‘CURLcode’ when I try to do anything I think you need a write callback function but I want to understand what the function does before I put it in my code
That typically means you need to install the libcurl library on the computer where you are trying to run the program. Follow the install instructions here: stackoverflow.com/questions/4530780/curl-curl-h-on-windows
@@deehanchowdhury1230 hey are you using visual studio or other text editor? . If you're using a text editor instead of an IDE it may get a little complicated as you have to compile everything manually. What you can do is download vcpkg and cmake! If you never heard of it. It's basically a tool that will help you install packages like curl ! You can simply search for vcpkg they have a well documented tutorial on how to use it. You'll just have to install the library there and it will do everything for you. The thing is if you're using a text editor vscode for example! You have to specify the path and toolchaine yourself. So if you want something quick go for visual studio for less configurations.
so you really havent used C to do a http request at all, you used libcurb which hides all the details. AND it seg faulted. Not great for an instructional video my friend.
fire vid bro! Super stoked I now have the ability to make HTTP requests in C. Keep it hundo
9:14 I think "segementation fault" is not supposed to be part of the response :P
Hello bro, please make a video about post request in C++ using the cpr library
thanks you sir for the effort you put in this video
Nice video bro!
Ty, very good video
I’m glad! Thanks for the comment
Thanks joe
My pleasure!
Thanks broh.
I'm getting an error "cannot convert 'CURLcode' to 'const char*'"
I am trying to learn C++ after years using Python, PHP and JavaScript. I know this is C code but would it be any different if done in C++? Also why doesn’t C++ have much info on restful API calls?
because it is C++
Hi there, thank you for the info! Do you know if there is the posibility to show a loading state? For example in the UI I would like to show a loader and disable a button while the request resolves.
😂😂😂😂⚰️
😂😂😂😂
Was this supposed to be a joke or u were serious? 😅
I'm getting expected ‘const char *’ but argument is of type ‘CURLcode’ when I try to do anything I think you need a write callback function but I want to understand what the function does before I put it in my code
Same with mine
Napoleon Dynamiiiiiiite
Hey man how do you use external proxy in curl?
I am not sure about that one. Sorry!
I cannot compile curl in windows 10, version 2004, getting error :'curl/curl.h' no such file or directory. what to do?
That typically means you need to install the libcurl library on the computer where you are trying to run the program. Follow the install instructions here: stackoverflow.com/questions/4530780/curl-curl-h-on-windows
@@CodeAndCrux Actually I have seen the answers in this particular post but all the libcurl library links are outdated :(
@@deehanchowdhury1230 hey are you using visual studio or other text editor? . If you're using a text editor instead of an IDE it may get a little complicated as you have to compile everything manually. What you can do is download vcpkg and cmake! If you never heard of it. It's basically a tool that will help you install packages like curl ! You can simply search for vcpkg they have a well documented tutorial on how to use it. You'll just have to install the library there and it will do everything for you. The thing is if you're using a text editor vscode for example! You have to specify the path and toolchaine yourself. So if you want something quick go for visual studio for less configurations.
I assume this doesn’t work with https request?
It should. I believe I have used the same or very similar code to make https requests in the past.
@@CodeAndCrux Thanks!
Can you do an openssl video with an emphasis on hmac? Really clean tutorial 👍🏻
good video, hope you will be more confident
Hi can anyone help me for postdata method?
printf(response) makes an error!
Add two argument in printf function like : "%u", response
@@trikkee This helped, thank you
so you really havent used C to do a http request at all, you used libcurb which hides all the details. AND it seg faulted. Not great for an instructional video my friend.
True, but still better than nothing
Is this method related as fast ?
As fast as what?