Skip to content

Commit 97d704f

Browse files
committed
improve readme
1 parent 592b150 commit 97d704f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,15 +1068,25 @@ You may use the "xml" middleware to translate input and output from JSON to XML.
10681068

10691069
Outputs:
10701070

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+
}
10721077

10731078
While (note the "format" query parameter):
10741079

10751080
GET /records/posts/1?format=xml
10761081

10771082
Outputs:
10781083

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>
10801090

10811091
This functionality is disabled by default and must be enabled using the "middlewares" configuration setting.
10821092

0 commit comments

Comments
 (0)