xuruidong commented on PR #10090:
URL: https://github.com/apache/apisix/pull/10090#issuecomment-1706521451

   > By the way, is it necessary to implement the `core.response.exit` as a 
vararg function? There are some strange usages:
   > 
   > ```
   > core.response.exit(200, { message = "msg1" }, "string-arg")
   > core.response.exit(200, { message = "msg1" }, { message2 = "msg2" })
   > ```
   > 
   > I think `core.response.exit(status_code, data)` is enough. If the function 
declaration can be simplified, maybe the `for-loop` and `encode_json` in 
`core.response.exit` can be removed.
   
   The purpose of the function should be to reduce the concatenation of 
strings, such as the usage shown below.
   ```
   core.response.exit(200, "string1", "string2", "string3")
   ```
   So , maintain the present state.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to