File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1068,15 +1068,25 @@ You may use the "xml" middleware to translate input and output from JSON to XML.
1068
1068
1069
1069
Outputs:
1070
1070
1071
- {"id":1,"user_id":1,"category_id":1,"content":"blog started"}
1071
+ {
1072
+ "id": 1,
1073
+ "user_id": 1,
1074
+ "category_id": 1,
1075
+ "content": "blog started"
1076
+ }
1072
1077
1073
1078
While (note the "format" query parameter):
1074
1079
1075
1080
GET /records/posts/1?format=xml
1076
1081
1077
1082
Outputs:
1078
1083
1079
- <root><id>1</id><user_id>1</user_id><category_id>1</category_id><content>blog started</content></root>
1084
+ <root>
1085
+ <id>1</id>
1086
+ <user_id>1</user_id>
1087
+ <category_id>1</category_id>
1088
+ <content>blog started</content>
1089
+ </root>
1080
1090
1081
1091
This functionality is disabled by default and must be enabled using the "middlewares" configuration setting.
1082
1092
You can’t perform that action at this time.
0 commit comments