Designing a third-party web solution

I'm building a third-party solution for web applications, which consists of: A client-side library A web server library A third-party service I'm getting blocked on some architecture decisions, specifically around how to send data. How to send the data? At first, I designed it so that data would be sent in the headers, and the web server library would use middleware to parse and forward it to my service. But this approach has size limitations, so I’m now leaning toward using a POST request instead. The downside is that this adds complexity to the web server library integration, as it would require an additional endpoint to handle these requests. Where to send the data? If I go with a POST request, I see two options: Send it directly from the client to the third-party service. Send it to the web server first, which then forwards it to the service. The main benefit of passing it through the web server is that if my service is down, the web server could handle failures more smoothly. I’d love to hear thoughts on this—what would be the better approach?

Feb 22, 2025 - 13:37
 0
Designing a third-party web solution

I'm building a third-party solution for web applications, which consists of:

  1. A client-side library
  2. A web server library
  3. A third-party service

I'm getting blocked on some architecture decisions, specifically around how to send data.

How to send the data? At first, I designed it so that data would be sent in the headers, and the web server library would use middleware to parse and forward it to my service. But this approach has size limitations, so I’m now leaning toward using a POST request instead. The downside is that this adds complexity to the web server library integration, as it would require an additional endpoint to handle these requests.

Where to send the data? If I go with a POST request, I see two options:

  • Send it directly from the client to the third-party service.
  • Send it to the web server first, which then forwards it to the service. The main benefit of passing it through the web server is that if my service is down, the web server could handle failures more smoothly.

I’d love to hear thoughts on this—what would be the better approach?