use of com.bsnbase.sdk.util.common.HttpService in project PCNGateway-Java-SDK by BSNDA.
the class UserService method userRegister.
/**
* User registration
* After a user participates in a CITA application service successfully, he/she needs to call this interface through the off-chain business system to generate the user account and account address for on-chain transaction processing.
*/
public static ResUserRegister userRegister(ReqUserRegister register) throws IOException {
String api = Config.config.getApi() + PathUtil.CITA_USER_REGISTER;
BaseReqModel<ReqUserRegister> req = new BaseReqModel<ReqUserRegister>();
req.setReqHeader(Config.config.getUserCode(), Config.config.getAppCode());
req.setBody(register);
HttpService<ReqUserRegister, ResUserRegister> httpService = new HttpService<ReqUserRegister, ResUserRegister>();
BaseResModel<ResUserRegister> res = httpService.post(req, api, ResUserRegister.class);
ResUserRegister body = res.getBody();
return body;
}
Aggregations