How to check for an HTTP status code of 401?

后端 未结 4 1406
我在风中等你
我在风中等你 2020-12-22 06:27

In one of the answers that I have received here, I encountered a problem of not knowing how to pass automatically through \"Google App Engines\" my ID and a password to a we

4条回答
  •  萌比男神i
    2020-12-22 07:11

    Most user-oriented sites don't use HTTP authentication, preferring instead to use cookie-based authentication, with HTML forms for signin. If you want to duplicate this in your own code, you need to make an HTTP POST request to the login URL for the application in question, and capture the cookie that's sent back, including that in all your future requests to authenticate yourself. Without more details about the specific site you're trying to authenticate against, it's difficult to be more specific.

提交回复
热议问题