REST API Headers vs Path Parameters vs Query Parameters vs Body

Поделиться
HTML-код
  • Опубликовано: 24 янв 2023
  • A discussion on the purpose and proper usage of HTTP Headers, Path Parameters, Query Parameters and Request Body when developing a REST API
    Clean URLs: en.wikipedia.org/wiki/Clean_URL
    Authorization Header: developer.mozilla.org/en-US/d...
    #restapi #http #programming #headers #api #development #technical #softwarearchitecture #softwaredevelopment #softwareengineering
  • НаукаНаука

Комментарии • 23

  • @amirhoseini3563
    @amirhoseini3563 14 дней назад

    excellent explanation ,well done

  • @niteeshmishra8281
    @niteeshmishra8281 Месяц назад +1

    it was really quite precise and much informative.

    • @apioncloud9092
      @apioncloud9092  20 дней назад

      Glad that you found it informative. Thank you!

  • @mudasir4965
    @mudasir4965 Год назад +2

    You're doing a great job man. Thank you.

  • @allison7324
    @allison7324 9 месяцев назад +1

    Thank you for breaking out this information and best practices!

    • @apioncloud9092
      @apioncloud9092  9 месяцев назад

      Glad that you found the video useful.

  • @alfredabate3176
    @alfredabate3176 Год назад +3

    Straightforward and simple. Thank you.
    I learn so much from this. Well done. 🙏

    • @apioncloud9092
      @apioncloud9092  Год назад +1

      Thank you, I’m glad that you found this video useful.

  • @ScottHolland0331
    @ScottHolland0331 Год назад +2

    I'm new to APIs and have been struggling to understand the difference between headers, body, path. Very helpful. Thank you.

    • @apioncloud9092
      @apioncloud9092  Год назад

      I am glad that you found this video helpful. Thank you.

  • @stardust3579
    @stardust3579 11 месяцев назад +1

    Great explanation with examples 👏

    • @apioncloud9092
      @apioncloud9092  11 месяцев назад

      Thank you and I appreciate the feedback.

  • @shubhankartiwari5101
    @shubhankartiwari5101 6 месяцев назад +1

    Precise and straight to the point

  • @thimiraakash9024
    @thimiraakash9024 10 месяцев назад +1

    Superb!!!!

  • @user-ru2jb4yo3s
    @user-ru2jb4yo3s 10 месяцев назад +1

    amazingggg

  • @user-jx3du2qw6n
    @user-jx3du2qw6n Год назад +3

    Thanks for the intro. But I was wondering, why don’t just use a post request with the body in every case? That way it could make the code more simple no?

    • @apioncloud9092
      @apioncloud9092  Год назад +3

      Short answer is that you can use a POST request for every case. If you are writing a HTTP/REST API and you will be calling that API from another application of yours then you can use POST request for everything.
      However, there are norms, conventions, best practices that people like to follow because it isn’t always just you working alone. When you are working for an employer with many other programmers, there will always be atleast one programmer who will question you for not following the conventions. For example, when an API’s job is to only return data and you decide to use POST method in your API instead of GET then others may ask you to justify why you used POST since it a general understanding that GET method is for data retrieval and POST request are used to change the state of the data on the server.
      Hope this answers your question.

  • @kapilchhipa2143
    @kapilchhipa2143 8 месяцев назад +1

    how come GET request cant have body?

    • @apioncloud9092
      @apioncloud9092  8 месяцев назад

      I don't think I've said anything like that in the video, have I?
      I'll double check the video. You are correct, GET request shouldn't have a request body