Documentation / @ember-data/request-utils / index / setBuildURLConfig
ts
function setBuildURLConfig(config): void;
Defined in: index.ts:141
Sets the global configuration for buildBaseURL
for host and namespace values for the application.
These values may still be overridden by passing them to buildBaseURL directly.
This method may be called as many times as needed. host values of ''
or '/'
are equivalent.
Except for the value of /
as host, host should not end with /
.
namespace should not start or end with a /
.
ts
type BuildURLConfig = {
host: string;
namespace: string'
}
Example:
ts
import { setBuildURLConfig } from '@ember-data/request-utils';
setBuildURLConfig({
host: 'https://api.example.com',
namespace: 'api/v1'
});
Parameters
config
Returns
void