HTTP status code for a partial successful request

前端 未结 4 2017
春和景丽
春和景丽 2020-11-29 02:22

I have an application that sends messages to users. In a post request a XML string is transferred that consists of all the users that should receive that particular message.

4条回答
  •  北海茫月
    2020-11-29 02:58

    I've dealt with a very similar issue. In this case, I returned a

    207 Multi-Status

    Now, this isn't strict HTTP, it's part of the WebDAV extension, so if you don't have control over the client too, then this isn't good for you. If you do, you could do something like so:

       
       
         
           user-123
           success
         
         
           user-789
           failure
         
       
    

    But again, this is an HTTP extension, and you need to have control of the client as well.

提交回复
热议问题