Search code examples
web-servicesweb-testing

Webinject - addheader change underscore into dash


I use addheader in webinject test:

addheader="__RequestVerificationToken: {PARSEDRESULT}"

In request debug header (in http.log) I see: --RequestVerificationToken: TOKEN

I think it should be __RequestVerificationToken insted of --RequestVerificationToken

So I can not complete the request because of wrong header.

Am I doing something wrong?


Solution

  • Answer

    The "__" characters should be escaped by adding a colon : character.

    addheader=":__RequestVerificationToken: {PARSEDRESULT}"
    

    The problem was described here https://github.com/sni/Webinject/issues/25#issuecomment-324053146