You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched existing issues and found nothing related to my issue.
Describe the bug
When sending an OData batch request (multipart/mixed) from Bruno on macOS, the request uses LF (\n) instead of CRLF (\r\n) for line endings. This causes batch requests to fail when sent to an SAP CAP (Cloud Application Programming) service, which strictly requires CRLF line endings.
A typically payload for such a request looks like this:
If the line break after each line is LF, the request fails. This does not happen on windows machines but unfortunately MacOS uses LF instead of CRLF. Could you add a feature like in VS Code where you can tell VS Code to use CRLF instead of LF.
If I use the body as in the screenshot I get an error.
When I create a text file with exactly the same content with VS Code set to CRLF mode and use this file:
I have checked the following:
Describe the bug
When sending an OData batch request (multipart/mixed) from Bruno on macOS, the request uses LF (\n) instead of CRLF (\r\n) for line endings. This causes batch requests to fail when sent to an SAP CAP (Cloud Application Programming) service, which strictly requires CRLF line endings.
A typically payload for such a request looks like this:
--batch_id-12345
Content-Type: application/http
Content-Transfer-Encoding: binary
POST myEntity HTTP/1.1
Content-Type: application/json
{
"Key1": "V12345678901234567890",
"Key2": "P0000000000000000001",
"Data1": "Test Vehicle",
"dbEntryCreatedOn": "2025-01-29T12:34:56.000Z"
}
--batch_id-12345--
If the line break after each line is LF, the request fails. This does not happen on windows machines but unfortunately MacOS uses LF instead of CRLF. Could you add a feature like in VS Code where you can tell VS Code to use CRLF instead of LF.
Thanks,
Jan
P.S.: The issue is also described here: https://community.sap.com/t5/technology-q-a/cap-batch-request-for-odata-apis/qaq-p/12158399
.bru file to reproduce the bug
If I use the body as in the screenshot I get an error.
When I create a text file with exactly the same content with VS Code set to CRLF mode and use this file:
curl -X POST "$API_URL"
-H "Authorization: Bearer $TOKEN"
-H "Content-Type: multipart/mixed; boundary=batch_id-12345"
-H "Accept: application/json"
--data-binary "@$BATCH_FILE"
everything works. If I save the file in LF mode also curl fails.
Screenshots/Live demo link
The text was updated successfully, but these errors were encountered: