用户(XML)
XML 用户:基于 4 个固定用户(ID 101-104)的 CRUD,接受并返回 application/xml。
- GET
https://api.testingapis.com/api/xml/UserXML/{id}Get a user by ID as XML. - GET
https://api.testingapis.com/api/xml/UserXML/allList all users as XML. - POST
https://api.testingapis.com/api/xml/UserXML/createAdd a user from an XML body. - DELETE
https://api.testingapis.com/api/xml/UserXML/delete/{id}Delete a user. - PUT
https://api.testingapis.com/api/xml/UserXML/update/{id}Update a user's name, job and city from an XML body.
请求示例
List all users as XML. 完整参考和 Send 按钮(英文).
cURL
curl -X GET "https://api.testingapis.com/api/xml/UserXML/all" \
-H "Accept: application/xml"响应 · 200 OK
<Users xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><User><Id>101</Id><Name>Hiroshi Tanaka</Name><Job>Engineer</Job><City>Tokyo</City></User><User><Id>102</Id><Name>Maria Gonzales</Name>…