Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

Stackorigin – The Community of Question and Answers

Stackorigin – The Community of Question and Answers Logo Stackorigin – The Community of Question and Answers Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
Home/ Questions/Q 36198
Next
In Process
sam
  • 0
sam
Asked: March 1, 20222022-03-01T12:59:09+00:00 2022-03-01T12:59:09+00:00In: Programming

What are the HTTP responses?

  • 0

What are the HTTP responses?

httprepsponses
  • 1 1 Answer
  • 24 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    Related Questions

    • How do you restart Apache?
    • aws s3 sdk returns "You have attempted to create more buckets than allowed"
    • What does ETL mean?
    • Is Apache running on my server?
    • Ways to Check Apache Server Status
    • Alternatives for Apache HTTP Server
    • How to access bitbucket using app password
    • How do I undo the most recent local commits in Git?
    • How do I rename both a Git local and remote branch name?
    • How do I rename a local Git branch?

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. ashok
      2022-03-01T13:00:34+00:00Added an answer on March 1, 2022 at 1:00 pm

      REST = Representational State Transfer

      REST is a set of rules, that when followed, enable you to build a distributed application that has a specific set of desirable constraints.

      REST is a protocol to exchange any(XML, JSON etc ) messages that can use HTTP to transport those messages.

      Features:

      It is stateless which means that ideally no connection should be maintained between the client and server. It is the responsibility of the client to pass its context to the server and then the server can store this context to process the client’s further request. For example, session maintained by server is identified by session identifier passed by the client.

      Advantages of Statelessness:

      1. Web Services can treat each method calls separately.
      2. Web Services need not maintain the client’s previous interaction.
      3. This in turn simplifies application design.
      4. HTTP is itself a stateless protocol unlike TCP and thus RESTful Web Services work seamlessly with the HTTP protocols.

      Disadvantages of Statelessness:

      1. One extra layer in the form of heading needs to be added to every request to preserve the client’s state.
      2. For security we need to add a header info to every request.

      HTTP Methods supported by REST:

      GET: /string/someotherstring It is idempotent and should ideally return the same results every time a call is made

      PUT: Same like GET. Idempotent and is used to update resources.

      POST: should contain a url and body Used for creating resources. Multiple calls should ideally return different results and should create multiple products.

      DELETE: Used to delete resources on the server.

      HEAD:

      The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.

      OPTIONS:

      This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.

      HTTP Responses

      Go here for all the responses.

      Here are a few important ones: 200 – OK 3XX – Additional information needed from the client and url redirection 400 – Bad request
      401 – Unauthorized to access
      403 – Forbidden
      The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.

      404 – Not Found
      The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

      405 – Method Not Allowed A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.

      404 – Request not found
      500 – Internal Server Failure
      502 – Bad Gateway Error

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Ask A Question

    Stats

    • Questions 1k
    • Answers 1k
    • Best Answers 75
    • Users 73

    Adv 250x250

    Adv 234x60

    • Recent
    • Answers
    • zhengwei

      How to use a spill kit for an oil spill

      • 0 Answers
    • zhengwei

      What is oil spill management?

      • 0 Answers
    • ashok

      How do you restart Apache?

      • 1 Answer
    • zhengwei

      How does a spill pallet work

      • 1 Answer
    • zhengwei

      What is floating booms

      • 1 Answer
    • hari
      hari added an answer Ubuntu way: To restart: sudo service apache2 restart To stop:… May 13, 2022 at 9:34 am
    • zhengwei
      zhengwei added an answer 1. Use with forklift: when using manual hydraulic forklift, mechanical… May 13, 2022 at 6:58 am
    • royyu
      royyu added an answer The solid float welded PVC oil containment boom is a universal horizontal… May 12, 2022 at 7:54 am
    • hari
      hari added an answer By default, an AWS account is soft limited to 100… May 11, 2022 at 3:15 pm
    • royyu
      royyu added an answer The oil leakage kit contains corresponding leakage emergency treatment materials,… May 11, 2022 at 6:27 am

    New Members

    jessie88

    jessie88

    • 0 Questions
    • 0 Answers
    clarkegable

    clarkegable

    • 0 Questions
    • 0 Answers
    Wellness Resort in Rishikesh

    Wellness Resort in Rishikesh

    • 0 Questions
    • 0 Answers
    Best IVF Hospital in Delhi

    Best IVF Hospital in Delhi

    • 0 Questions
    • 0 Answers
    Mohammedtaufiqumar

    Mohammedtaufiqumar

    • 1 Question
    • 0 Answers

    Adv 234x60

    Trending Categories

    Programming
    802Questions
    , 0Followers
    Technology
    208Questions
    , 3Followers
    General Knowledge
    104Questions
    , 0Followers
    Business & Finance
    81Questions
    , 4Followers
    Health
    72Questions
    , 3Followers

    Trending Tags

    django (94) git (47) google (29) health (21) india (35) mysql (22) oil (36) python (237) usa (25) youtube (23)

    Recent posts

      • On: May 17, 2022

      How To Translate Japanese From Image

      • On: May 17, 2022

      How to Convert Celcius to Fahrenheit 

      • On: May 13, 2022

      How to Start, Stop, or Restart Apache Server on Ubuntu

      • On: May 13, 2022

      How to Install Apache on Ubuntu

      • On: May 5, 2022

      CORS in Django REST Framework

    Explore Our Blog

    Adv 234x60

    Subscribe

    Explore

    • Recent Questions
    • Most Answered
    • Answers
    • No Answers
    • Most Visited
    • Most Voted
    • Random

    Footer

    Stackorigin - The Community of Question and Answers

    Stackorigin

    Stackorigin is the world’s largest Q&A networking site, Stackorigin community brings you the collaboration of all the various Questions and the related Answers given by the community.

    About

    • About Us
    • Contact Us
    • FAQ
    • Guest Post Article

    Info

    • Privacy Policy
    • Terms and Conditions
    • Community Guidelines
    • Tags

    Products

    • Tutorials
    • Advertising
    • Categories
    • Corona
    • StackHow

    Follow

    © 2022 Stackorigin. All Rights Reserved.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.