I am using named credentials to store the username password for apex callout. In my apex class. I am storing using the below code to use the named credentials. Is there way not to hard code some_path
URL in the code? Link - https://help.salesforce.com/articleView?id=000206791&language=en_US&type=1
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:My_Named_Credential/some_path');
req.setMethod('GET');
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug(res.getBody());