Unleash/unleash

POST endpoint for the proxy/frontend api

omarzouk opened this issue · 3 comments

Describe the feature request

Would it be possible to add a POST endpoint that accepts context parameters as json data?

Background

Using the GET endpoint with large contexts forces a change in the network infrastructure to allow large request headers which is not always desirable. Also, having to urlencode all variables adds an unnecessary complexity. It adds a limitation to the size of the context that doesn’t really need to be there.

Solution suggestions

Add a POST endpoint to proxy/frontend API

Hi @omarzouk - Thank you for raising this issue! I'll reach out to the rest of the team and get back to you.

Hey @omarzouk! I think this probably makes sense to add, can't promise you a timeline though. I'll have to have a quick huddle with the team that built this tomorrow to see if they have any objections but I can't see any off the top of my head.

That being said, I would generally suggest you treat the proxy/frontend endpoint as an experimental starting point rather than something to scale out against. Using really large contexts suggests that you're already hitting the sane limits of using this. Have you considered using Edge (https://github.com/Unleash/unleash-edge)? This handles scale a whole bunch better and already supports the POST endpoint you want. It's a whole bunch better for privacy as well

You also mention that it's a pain to URL encode the parameters, usually the proxy SDKs will do that for you, which I recommend using since they'll make sure metrics get handled correctly.