HTTP Post requestwith 302 found response, empty $response


#1

1) Give a description of the problem

I need to make a post request with login and it return 302 wich is redirect.

2) What is the expected behaviour?

get access token orcookie to send a get request

3) What is happening/not happening?

$response is only filled if the status code is 200 as far as I know!

I tried with allow_redirects = false (get a 200 code but I get login text or other things like that)

What can I do to get an access token or cookie to use to extract data from a page?