Java
- 1 ответ
- 0 вопросов
1
Вклад в тег
HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
HttpHost currentHost = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
String currentUrl = (currentReq.getURI().isAbsolute()) ? currentReq.getURI().toString() : (currentHost.toURI() + currentReq.getURI());
currentUrl = currentUrl.replace("#", "?");
Uri uri=Uri.parse(currentUrl);
String access_token = uri.getQueryParameter("access_token");
long user_id = Long.valueOf(uri.getQueryParameter("user_id"));