我想使用 restlet 来消费一个休息网络服务。这将通过一个帖子来完成。我需要在以下代码中添加什么:
ClientResource resource = new ClientResource("url");
resource.setChallengeResponse(ChallengeScheme.HTTP_BASIC, user, password);
我有一个 Json 字符串,在实现我的 rest-webservice 的代码中,输入是一个表示对象。如果可能的话,我需要我的参数(作为 jsonstring)在 entity.gettext() 方法中。
public StartProcessInstanceResponse startProcessInstance(Representation entity)
jsonstring = entity.gettext();
提前致谢。