Languages

Spring Boot - best way to prevent sending overhead data in URL per each API request?

5 points
Asked by:
Emorak
366

I am developing web service that provides API that intermediates in some operations with desired web service.

Application concept:

 

My web service, needs in each request the following path prefix:

It makes URLs not clear.

 

Is there some way to reduce that overhead information?

I was thinking about putting it into HTTP headers but it requires setting it each time also.

1 answer
3 points
Answered by:
Root-ssh
178180

Consider storing clientId, tenantId, divisionId and employeeId variables in session.

Example user login concept:

Example some action concept:

 

See also

  1. Spring Boot 2.x - change session cookie id value length (JSESSIONID length in Tomcat server)

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join