2
Expose the response body text for plugins
Source: Kong/insomnia#3571 · opened by @iandunn
Problem
#423 requested being able to get and set the request and response bodies. #2003 added that ability for requests, but not for responses. #1830 was related.
My use case is that I'd like to write a plugin that appends a formatted date/time to timestamp values in responses, so that they're human-readable. For example, 1599858469 would become 1599858469 (Fri Sep 11 14:07:49 PDT 2020).
It seems like the only current method is working with the buffers, which requires jumping through extra hoops.
Ideal solution
Add getBodyText() and setBodyText() functions.
Alternate solution
Add examples of working with buffers to the documentation, so developers can just copy/paste the code.
#423 requested being able to get and set the request and response bodies. #2003 added that ability for requests, but not for responses. #1830 was related.
My use case is that I'd like to write a plugin that appends a formatted date/time to timestamp values in responses, so that they're human-readable. For example, 1599858469 would become 1599858469 (Fri Sep 11 14:07:49 PDT 2020).
It seems like the only current method is working with the buffers, which requires jumping through extra hoops.
Ideal solution
Add getBodyText() and setBodyText() functions.
Alternate solution
Add examples of working with buffers to the documentation, so developers can just copy/paste the code.
No pledges yet. Be the first to back this.
No comments yet.