This relates to my other question on accessing a REST service that uses forms authentication, but I feel it is substantially enough a discrete issue.
When I paste a REST call into my browser address bar, before I am authenticated, I am redirected to a login page on the services web site. I log in and receive a cookie, which authenticates subsequent REST calls or user oriented page requests.
When I recreate the login screen locally and perform the same HTTPS POST that the online login screen performs, I get the error 422 - Unprocessable Entity. I have compared my POST request and that from their login screen, and there are precisely two headers that differ, being "Referer" and "Cookie". Even when I set these headers in my request to the same as in their request, I still get the same error.