2015-05-28 73 views

回答

2

是的,這是支持的,看到這篇文章:Handling multiple actions on a single resource

You can write multiple Request(s) *and/or* Response(s). It is especially suitable for handling multiple types of Content-Type header.

# Message [/messages/{id}] 
    This resource represents one particular message identified by its *id*. 

    ## Retrieve Message [GET] 
    + Response 200 (application/json) 

      {"message":"Hello World!"} 

    + Response 200 (text/plain) 

      Hello world! 

    + Response 401 (text/plain) 

      There is no such a message for you, dear guest. 

    + Response 410 

      The message you are searching for does not exist anymore. 
相關問題