A
A
amf1k2014-10-29 10:58:58
Java
amf1k, 2014-10-29 10:58:58

How to deal with the request to the server for authorization?

You need to get some data from the site in a Java program, but for this you need to go through authorization. Advised where to start. You need to look at what is sent to the server during authorization in the browser and repeat the same programmatically. Only a GET request is sent to the server, I still do not understand what to do with it. And in response - the code of the authorized page is transmitted, but if cookies are needed, how to get them, what is generally transmitted to the server?
d3d4e0562cbe41008652aaff7f96f659.PNG

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vasily, 2014-10-29
@Applez

Apache has libs to deal with HTTP connections. Try to use. Apache HTTP Components

P
PaulZi, 2014-10-29
@PaulZi

You have a request in the screenshot clearly after authorization. Usually authorization is transferred by POST-request.

Y
YV, 2014-10-30
@targetjump

Check if the service has an API for authentication.
For requests, I would suggest using http-request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question