@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface HostParam
Host.
You provide the value, which should be the same (case sensitive) with
the parametrized segments in '{}' in the host, unless there's only one
parametrized segment, then you can leave the value empty. This is extremely
useful when the designer of the API interface doesn't know about the named
parameters in the host.
Example 1: named parameters
@Host("{accountName}.{suffix}")
interface DatalakeService {
@GET("jobs/{jobIdentity}")
Job getJob(@HostParam("accountName") String accountName, @HostParam("suffix") String suffix, @PathParam("jobIdentity") jobIdentity);
}
Example 2: unnamed parameter
@Host(KEY_VAULT_ENDPOINT)
interface KeyVaultService {
@GET("secrets/{secretName}")
Secret get(@HostParam String vaultName, @PathParam("secretName") String secretName);
}public abstract String value
public abstract boolean encoded
value() is already
encoded hence engine should not encode it, by default value will be encoded./**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/