Activity Forums Salesforce® Discussions What is the meaning of statelessness in terms of RESTful web services in Salesforce?

  • Vinay

    Member
    July 17, 2018 at 7:07 am

    Hi Sanjana,

    1.a RESTful Web Service should not keep a client state on the server. This restriction is called Statelessness.

    2.If you hit a url using your browser or using a java based client, result will always be the User XML whose Id is 1 because the server does not store any info about the client.

  • Parul

    Member
    September 14, 2018 at 8:18 am

    Statelessness means that every HTTP request happens in complete isolation. When the client makes an HTTP request, it includes all information necessary for the server to fulfill that request. The server never relies on information from previous requests. If that information was important, the client would have sent it again in this request.

    Thanks.

  • shariq

    Member
    September 14, 2018 at 12:18 pm

    Hi,

    RESTful Web Service should not keep a client state on the server. This restriction is called Statelessness. 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.

    Following are the benefits of statelessness in RESTful Web Services −

    Web services can treat each method request independently.
    Web services need not maintain the client's previous interactions. It simplifies the application design.
    As HTTP is itself a statelessness protocol, RESTful Web Services work seamlessly with the HTTP protocols.

    Hope this helps!

  • Avnish Yadav

    Member
    September 14, 2018 at 12:49 pm

    Hi,

    Meaning of statelessness in terms of RESTful web services means that every request is independent of each other means server does not remember the previous state.

    Thanks.

Log In to reply.

Popular Salesforce Blogs