What is the proper HTTP response to send for requests that require SSL
Posted
by dasil003
on Stack Overflow
See other posts from Stack Overflow
or by dasil003
Published on 2010-03-31T16:43:42Z
Indexed on
2010/03/31
21:23 UTC
Read the original article
Hit count: 262
I'm designing an RESTful API where some calls are public over HTTP, and some require an API key and encryption over HTTPS. I'm deliberating on what response code should be sent if an HTTP request is sent to one of the private resources. So far the only one that jumps out at me is 412 - Precondition Failed, but the standard indicates that the precondition is imposed by the requester not the server.
Is there an appropriate response code for this condition or do I just need to give in and do 400?
© Stack Overflow or respective owner