Top 10 API Testing Interview Q&A with Examples || Part - 001 || 2-10 Years YOE

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ม.ค. 2025

ความคิดเห็น • 7

  • @MohammadHoque-fb1bg
    @MohammadHoque-fb1bg 8 หลายเดือนก่อน +1

    You're awesome buddy your explanation is soooooo smooth.....loved it!!

  • @automatewithsidharth
    @automatewithsidharth  ปีที่แล้ว

    🤝For SDET or Automation Testing trainings along with career guidance, mock interviews, design patterns, chatGPT: refer demo here : topmate.io/sidharth_shukla/110008

  • @nehasingh-kt9rr
    @nehasingh-kt9rr หลายเดือนก่อน

    But i have seen at many places that post return 200 , then why is it so?

    • @automatewithsidharth
      @automatewithsidharth  28 วันที่ผ่านมา

      Top 5 reasons for POST method returning 200 :
      No Resource Created:
      If the POST operation doesn't create a new resource but performs an action (e.g., updating data or triggering a workflow), returning 200 OK is appropriate.
      Example: Submitting a search form or sending an email via a POST request.
      Legacy Systems or Practices:
      Some older systems or APIs may not strictly adhere to the spec or use 200 OK for simplicity or out of habit.
      Lack of Location Header:
      If the API doesn't return the URI of the newly created resource, some developers opt to return 200 OK instead of 201 Created.
      Convenience or Consistency:
      To keep responses uniform across endpoints, developers might default to 200 OK for all success responses, even if 201 Created is more semantically correct.
      Client Expectations:
      Some client libraries or systems might expect 200 OK for all success responses and handle 201 Created differently, leading developers to stick with 200 OK.

  • @nishakhetani2605
    @nishakhetani2605 ปีที่แล้ว

    One question that if I'm doing a put request and the resource is not created then will it create a new resource or throw any error?

    • @automatewithsidharth
      @automatewithsidharth  ปีที่แล้ว

      It depends on server implementation, If the resource doesn't exist, some servers may create a new resource, while others may return an error, such as a 404 Not Found or a 409 Conflict status code. The exact behavior can vary based on the server's configuration and the API design.