# In each request, we sent a multiline body and get
# the same body as response. Request body is tested server side
# and we assert the response here.
POST http://localhost:8000/multilines/plain-text
```
line1
line2
line3
```
HTTP 200
# Different ways of testing body response:
# with explicit asserts:
[Asserts]
body == "line1\nline2\nline3\n"
body == ```
line1
line2
line3
```
# Or we can just test the body (implicit assert):
```
line1
line2
line3
```
POST http://localhost:8000/multilines/json
```json
{
"foo": "bar"
"baz": 123456
}
```
HTTP 200
# Different ways of testing body response:
# with explicit asserts:
[Asserts]
body == "{\n \"foo\": \"bar\"\n \"baz\": 123456\n}\n"
body == ```json
{
"foo": "bar"
"baz": 123456
}
```
# Or we can just test the body (implicit assert):
```json
{
"foo": "bar"
"baz": 123456
}
```
POST http://localhost:8000/multilines/xml
```xml
Gambardella, Matthew
XML Developer's Guide
Computer
44.95
2000-10-01
An in-depth look at creating applications
with XML.
```
HTTP 200
# Different ways of testing body response:
# with explicit asserts:
[Asserts]
body == "\n\n \n Gambardella, Matthew\n XML Developer's Guide\n Computer\n 44.95\n 2000-10-01\n An in-depth look at creating applications\n with XML.\n \n\n"
body == ```xml
Gambardella, Matthew
XML Developer's Guide
Computer
44.95
2000-10-01
An in-depth look at creating applications
with XML.
```
# Or we can just test the body (implicit assert):
```xml
Gambardella, Matthew
XML Developer's Guide
Computer
44.95
2000-10-01
An in-depth look at creating applications
with XML.
```
POST http://localhost:8000/multilines/graphql
```graphql
{
hero {
name
# Queries can have comments!
friends {
name
}
}
}
```
HTTP 200
# Different ways of testing body response:
# with explicit asserts:
[Asserts]
body == "{\"query\":\"{\\n hero {\\n name\\n # Queries can have comments!\\n friends {\\n name\\n }\\n }\\n}\"}"
body == ```graphql
{
hero {
name
# Queries can have comments!
friends {
name
}
}
}
```
# Or we can just test the body (implicit assert):
```graphql
{
hero {
name
# Queries can have comments!
friends {
name
}
}
}
```