如何使用ServiceStack Android Client发送http补丁请求

时间:2017-04-27 21:43:16

标签: servicestack

是否可以使用servicestack android客户端发送补丁请求?如果没有,我可以让android客户端cookie在android中使用其他HttpClient吗?

PatchRequest = new JsonPatchRequest
{
 new JsonPatchElement
 {
  op = "replace",
  path = "timezone",
  value = timezone
 },
 new JsonPatchElement
 {
  op = "replace",
  path = "language",
  value = language
  }
}

1 个答案:

答案 0 :(得分:1)

ServiceStack Android客户端不支持JsonPatchRequest ServiceStack的Android客户端只能用于调用ServiceStack服务。

但您可以使用以下内容迭代所有Cookie:

CookieManager cookieManager = (CookieManager) CookieHandler.getDefault();
List<HttpCookie> cookies = cookieManager.getCookies();
for (HttpCookie cookie: cookies) {
    Log.d(TAG, "cookie name : "+cookie.getName().toString());
}