简体   繁体   English

Java浏览-部分处理

[英]Java browsing - section handling

While I am trying to get a html page from server, I would like to add some config to the server (eg. login with post method). 当我尝试从服务器获取html页面时,我想向服务器添加一些配置(例如,使用post方法登录)。

How to let the server knows that I am the same user and access the other pages? 如何让服务器知道我是同一用户并访问其他页面?

Eg. 例如。

  1. login wordpress 登录wordpress

  2. get private page of wordpress 获取wordpress的私人页面

(java coding might not needed, I think I need to know the idea.) (可能不需要Java编码,我想我需要知道这个想法。)

Finally I used the Java HttpClient Interface AuthenticationStrategy 最后,我使用了Java HttpClient 接口AuthenticationStrategy

It provides getChallenges to send and get the section data need. 它提供getChallenges来发送和获取节数据需求。 And select to send the related data to act as sections, cookies and so on. 选择发送相关数据以充当部分,Cookie等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM