node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

Backport sendRaw to 4.x

Open test137E29B opened this issue 1 year ago • 0 comments

  • [x] Used appropriate template for the issue type
  • [x] Searched both open and closed issues for duplicates of this issue
  • [x] Title adequately and concisely reflects the feature or the bug

Feature Request

I'm requesting sendRaw be backported to 4.x from 5.x for a number of reasons:

  • There's an old codebase I have that relies on 4.x error structures and clients that would be incredibly laborious to migrate to 5.x
  • I am attempting to integrate with a service that is still expecting XML responses (fairly large company that isn't going to update any time soon to json)

Use Case

There are a lot of old services that expect your API to respond with XML still, though their numbers are dwindling. While a lot of devs may have upgraded their restify to v5x+, my company has not. It would be better to have this in the official module in my opinion, even if in an older version like 4x to prevent the requirement to fork the entire repo and potentially miss out on any update to 4x (albeit a very small chance of this since it's untouched for 5 years now) that could be around security.

Example API

Essentially the same as 5x sendRaw on responses

Are you willing and able to implement this?

Yes, there is an older PR that has the actual code change already for 5x: https://github.com/restify/node-restify/pull/1025/files

I have opened https://github.com/restify/node-restify/pull/1919/files for this request already. Thank you!

test137E29B avatar Sep 22 '22 17:09 test137E29B