Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improvement Suggestion - Make low level POST response body non empty #70

Open
andrewlaunchsite opened this issue Jun 3, 2023 · 0 comments

Comments

@andrewlaunchsite
Copy link

andrewlaunchsite commented Jun 3, 2023

Hello @jcoon97

Currently, high-level POST requests return API objects while low level requests return response objects, with empty bodies. For example, createVerifiedPersonal returns a Customer, while the equivalent low level request returns a response with an empty body and a location header pointing to the created resource. This is impractical, uncommon, and inconvenient design; it forces the caller to make a second request to retrieve the created data. Unnecessary networking overhead and poor performance. The low level POST should return a body containing the created data.

If you're wondering "why doesn't he just use the high-level request then?" well - that's because the high level request design is also not preferable. Each function requires the JSON attributes to be passed in as a function parameter. FYI - 5+ function parameters is a major code smell (imagine someone swaps placement for first/last name, etc. -- it becomes unwieldy and increases chances of making mistakes). These functions should take strongly typed request objects as parameters. Not individual parameters. Anyway, the design of this SDK leaves a lot to be desired, and for the price-point, I'm pretty disappointed.

I'm hoping your team will consider these pain-points and consider making some improvements.

@andrewlaunchsite andrewlaunchsite changed the title Improvement Suggestion - Make low level POST request body non empty Improvement Suggestion - Make low level POST response body non empty Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant