Why did you make a stack overflow post?
I could of replied here.
Your params should be headers
See this example script