Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Custom separator #21

Open
mjablecnik opened this issue Nov 6, 2021 · 1 comment
Open

Custom separator #21

mjablecnik opened this issue Nov 6, 2021 · 1 comment

Comments

@mjablecnik
Copy link

Hello, I want to use my own custom separator instead of '.'
but when I add '#---' so it doesn't work.
Do you know why?
I have there '#' for make as comment it..

Here is example of my file:

#---

POST /dapi/v1/inventory/item/EAN123/save HTTP/1.1

{"items":["SN123","SN124","SN125","SN126"]}

HTTP/1.1 200 OK

#---

GET /dapi/v1/inventory/item/SN123/check HTTP/1.1

HTTP/1.1 200 OK
Content-Type: application/json

{
  "in_stock": true
}

#---

GET /dapi/v1/inventory/item/SN123/location HTTP/1.1

HTTP/1.1 200 OK
Content-Type: application/json

{
  "location": {
    "code": "1-2-3A",
    "name": "L123A"
  }
}

#---

My version is: 1.0.14

@xnbox
Copy link
Owner

xnbox commented Nov 6, 2021

Hi, '.'-separator separates the body of the request/response from everything else (we have to somehow determine where the body ends). If there is no comment '.'-separator does not have to be used. If the comment character '#' is inside the body, it will not be treated as a comment, but as part of the body. If the exact length of the body is not necessary (for JSON, for example) you don't have to use a dot.
But perhaps I should consider adding an option to change the default delimiter.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants