Make an HTTP Request with the C Programming Language

Поділитися
Вставка
  • Опубліковано 21 жов 2024

КОМЕНТАРІ • 39

  • @butcracjack
    @butcracjack 3 місяці тому

    fire vid bro! Super stoked I now have the ability to make HTTP requests in C. Keep it hundo

  • @weirddan455
    @weirddan455 2 роки тому +12

    9:14 I think "segementation fault" is not supposed to be part of the response :P

  • @tintun9419
    @tintun9419 3 роки тому +2

    Hello bro, please make a video about post request in C++ using the cpr library

  • @romania-n6q
    @romania-n6q 2 роки тому

    thanks you sir for the effort you put in this video

  • @sanjeevsawargi552
    @sanjeevsawargi552 Рік тому

    Nice video bro!

  • @elvisedmar6629
    @elvisedmar6629 3 роки тому +1

    Ty, very good video

    • @CodeAndCrux
      @CodeAndCrux  3 роки тому

      I’m glad! Thanks for the comment

  • @judeurban1456
    @judeurban1456 3 роки тому +1

    Thanks joe

  • @dipeshsamrawat7957
    @dipeshsamrawat7957 Рік тому

    Thanks broh.

  • @subhraneelmukhopadhyay309
    @subhraneelmukhopadhyay309 Рік тому

    I'm getting an error "cannot convert 'CURLcode' to 'const char*'"

  • @findjonmoses
    @findjonmoses Рік тому

    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?

    • @budgetarms
      @budgetarms 9 місяців тому

      because it is C++

  • @natalyrocha7840
    @natalyrocha7840 2 роки тому

    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.

  • @nonetrix3066
    @nonetrix3066 2 роки тому +3

    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

  • @Bodybuilder900ml
    @Bodybuilder900ml Рік тому

    Napoleon Dynamiiiiiiite

  • @blitzpark1250
    @blitzpark1250 3 роки тому +2

    Hey man how do you use external proxy in curl?

    • @CodeAndCrux
      @CodeAndCrux  3 роки тому

      I am not sure about that one. Sorry!

  • @deehanchowdhury1230
    @deehanchowdhury1230 3 роки тому +1

    I cannot compile curl in windows 10, version 2004, getting error :'curl/curl.h' no such file or directory. what to do?

    • @CodeAndCrux
      @CodeAndCrux  3 роки тому +2

      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
      @deehanchowdhury1230 3 роки тому +1

      @@CodeAndCrux Actually I have seen the answers in this particular post but all the libcurl library links are outdated :(

    • @orcave8802
      @orcave8802 3 роки тому +1

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

  • @fancywaifu9821
    @fancywaifu9821 3 роки тому +1

    I assume this doesn’t work with https request?

    • @CodeAndCrux
      @CodeAndCrux  3 роки тому +2

      It should. I believe I have used the same or very similar code to make https requests in the past.

    • @fancywaifu9821
      @fancywaifu9821 3 роки тому

      @@CodeAndCrux Thanks!

  • @Bodybuilder900ml
    @Bodybuilder900ml Рік тому

    Can you do an openssl video with an emphasis on hmac? Really clean tutorial 👍🏻

  • @kotvkvante22
    @kotvkvante22 Рік тому

    good video, hope you will be more confident

  • @farooqahmed4954
    @farooqahmed4954 2 роки тому

    Hi can anyone help me for postdata method?

  • @florianunterfrauner2041
    @florianunterfrauner2041 Рік тому +1

    printf(response) makes an error!

    • @trikkee
      @trikkee Рік тому +1

      Add two argument in printf function like : "%u", response

    • @randolphzhang652
      @randolphzhang652 11 місяців тому

      @@trikkee This helped, thank you

  • @turdwarbler
    @turdwarbler 2 роки тому +2

    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.

    • @damca3160
      @damca3160 Рік тому +1

      True, but still better than nothing

  • @pronone3
    @pronone3 3 роки тому

    Is this method related as fast ?