Passing switch state to url

Hi there. I am trying to create a rule that passes the state of my virtual switch to an http get command but I cannot figure this out. I have tried creating a local variable and adding a condition around this but can get that working. Please help.