Add requestLimit and targetUrl to request config
Related to issue #10, but not solves it completely.
Add 2 options to request config:
- redirectLimit - Limit for redirects performed while doing HTTP request
- targetUrl - Expected request url after all redirects has been done
Thanks for the pull request @gepo . I feel the name 'redirectLimit' is better than 'requestLimit'. Whats the reason behind renaming to requestLimit ?
I wanted to have the ability both to not limit redirect for request and to forbid any redirects at all, but leave "not limit" logic as default.
If one use a parameter with name redirectLimit then it should be 0 for the case of "forbid any redirects". From another side default value for this parameter if it's not mentioned in json files also 0.
So I just increment value for this paremeter, rename it to requestLimit and use "0" for "not limit", and "1" for "forbid any redicts".