19.01.2023, 21:04
(19.01.2023, 10:03)admin Wrote: Yes, you need to set the respective header:
Code:headers =
{
Cookie = cookies,
...
There are some other issues with your script:
1. csrf token extraction does not skip the double quotes, it should be like this:
Code:local csrf_token = string.sub(response,j+1,k-1)
2. request should be done using "application/x-www-form-urlencoded" content type. Data should be encoded using this format, not JSON. See encodepost function here: https://forum.logicmachine.net/showthrea...1#pid27711
Thanks for your help. I have succeed in the task.