Endpoint redirection

Changing service endpoints isn't always ideal, However, if it needs to, will the service client know about it and use the new endpoint? Yes, with standard HTTP return codes, 3xx, and with the Location header, then by receiving 301 Moved permanently or 307 Temporary Redirect, the service client can act accordingly. The endpoint redirection pattern suggests returning standard HTTP headers and provides an automatic reference of stale endpoints to the current endpoints:

As we can see, the service consumers may call the new endpoints that are found in the Location header.

Please refer to our investor service example for header implementations if you want to play around with 3xx codes and Location headers.

Please note that with the HATEOAS implementation at the services, the client could potentially avoid these endpoint redirections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.73.127