QuestionQ24Verified/Rest APICopy linkReport a problemAsk AstroTutorSave questionYou are using a REST API to create a new resource. Which HTTP method will accomplish this task?APUTBPATCHCPOSTDGETShow AnswerAnswerExplanationPOST is the HTTP method conventionally used in REST APIs to create a new resource. When a client sends a POST request to a collection endpoint, the server creates a new resource and typically returns its location and identifier. This is distinct from PUT (used to update or replace an existing resource, or create one at a client-specified URI), PATCH (used for partial updates), and GET (used to retrieve a resource without modifying it).Learn moreHTTP request methods - MDN Web DocsShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion