ACR Rules

  1. Home
  2. Docs
  3. ACR Rules
  4. Maintainability (28)
  5. URL endpoints should not be hard-coded

URL endpoints should not be hard-coded

When calling REST or web (SOAP) services it is a bad practice to hard-code the endpoints. Endpoints can change and it is very likely that different endpoints need to be used for test and production. In both of these use cases, it is preferable to use a constant for the endpoint.

Noncompliant solution:

Compliant solution: