Keycloak admin-cli 抛出 - HTTP 错误 - 415 不支持的媒体类型
Keycloak admin-cli throwing - HTTP error - 415 Unsupported Media Type
我正在尝试从 admin-cli 更新领域,但以 415 不受支持的媒体类型结束。
仅供参考,我没有对 demorealm.json 文件进行任何更改。
/opt/keycloak/bin/kcadm.sh get realms/CRUE_Realm > demorealm.json
/opt/keycloak/bin/kcadm.sh update realms/CRUE_Realm > demorealm.json
HTTP error - 415 Unsupported Media Type
尝试更改为:
/opt/keycloak/bin/kcadm.sh update realms/CRUE_Realm -f demorealm.json
另请参阅:
Keycloak Documentation19.5. Basic operations and resource URIs
The create and update commands send a JSON body to the server by default. You can use -f FILENAME to read a premade document from a file.
我正在尝试从 admin-cli 更新领域,但以 415 不受支持的媒体类型结束。
仅供参考,我没有对 demorealm.json 文件进行任何更改。
/opt/keycloak/bin/kcadm.sh get realms/CRUE_Realm > demorealm.json
/opt/keycloak/bin/kcadm.sh update realms/CRUE_Realm > demorealm.json
HTTP error - 415 Unsupported Media Type
尝试更改为:
/opt/keycloak/bin/kcadm.sh update realms/CRUE_Realm -f demorealm.json
另请参阅: Keycloak Documentation19.5. Basic operations and resource URIs
The create and update commands send a JSON body to the server by default. You can use -f FILENAME to read a premade document from a file.