Rohit Bajaj
asked on
Making curl request through some java library
HI,
I have the following curl request and response :
What i want to do is make another curl request say curl2 which uses the authToken returned from the above request. say curl1 And after 2 hr again use the above curl1 request to get a new authtoken and use the autoken in curl2.
like this for 6 -7 times.
Please suggest any easy way to do it.
It doesnt matter how its done ..
Through postman/Java code etc or any other way.
I am although preferably looking for some good http library which i can use
I have the following curl request and response :
curl 'https://sso.zeapps.in/renw-seseep-alive' -H 'Upgrade-Insecure-Requests: 1'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/74.0.3729.169 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'Referer: https://web.zetaapps.in/'
-H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-IN,en-GB;q=0.9,en-US;q=0.8,en;q=0.7' -H 'Cookie:
__cfduid=dccce009d1b93daca71ebd131558887475; _ga=GA1.2.602226.1587478; _gid=GA1.2.197749.1505258;
connect.sid=s%3AV74P3e3NKIwARYetmmW3PzXR.wJoT7tQbfUk3GQhMO7OZ026OTDSWsJTMI; _gat=1;
amplitude_idzetaapps.in=eyJkZXZpY2VJZCI6IjExZmVhMDUwItN1iYTEyLTFhNdCI6ZmFsc2UsInNlc3Npb25JZCI6M
TU2MDE4MjkwNzEzNywibGFzdEV2ZW50VGltZSI6MTU2MDE4Mjk2Mjc4NCwiZXZlbnRJZCI6MCwiaWRlbnRpZnlJ
ZCI6MCwic2VxdWVuY2VOdW1iZXIiOjB9; AWSALB=bIejBRzXqtKh/dsTqgCZyQpUTLqzjm5so+pQUS32gLmQAybM6Dz/8y8IKmD14IPY/o0NVF8+gIjAZSMRFso+
UHL8aT7iehq4WdRaJU0aIX2GF21' --compressed
<p>Found. Redirecting to <a href="https://web.zetaapps.in/#/setup-guide?
authToken=TOVJPQ%3D%3D&trackingCookie=e3NKIwARYetmmW3mvaPqQ2TPzXR&userId=117&
userJID=17%40zeuser.zea.in%2F31&validTill=1560191914368">https://web.zetaapps.in/#/setup-guide?
authToken=T0VJPQ%3D%3D&trackingCookie=e3NKIwARYetmmW3mvaPqQ2TPzXR&userId=117&
userJID=17%40zetser.zea.in%2F31&validTill=156019191
What i want to do is make another curl request say curl2 which uses the authToken returned from the above request. say curl1 And after 2 hr again use the above curl1 request to get a new authtoken and use the autoken in curl2.
like this for 6 -7 times.
Please suggest any easy way to do it.
It doesnt matter how its done ..
Through postman/Java code etc or any other way.
I am although preferably looking for some good http library which i can use
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.