0

I'm using Python requests 2.19.1 . But I'm facing an intermittent issue where I get no response at all when I post to a specific url.

I'm trying to check if the LDAP is giving me the expected output for invalid credentials. Here's the format:

requests.post('https://oxhp-member.uhc.com/Member/MemberPortal/j_acegi_security_check',
              credentials_payload) 

that I'm posting

Almost everytime, it works fine. But sometimes, it doesn't give any response for that. Even network issues gives us some response. Right? Why am I not getting any response for the above call.

Is there any existing bug in requests?

Somebody please point me in correct direction.

4

1 回答 1

1

requests不负责“回馈”。您requests用于发布到的服务器是。

要查看响应,您必须将其保存在变量中并以某种方式处理它。

resp = requests.post('https://oxhp-member.uhc.com/Member/MemberPortal/j_acegi_security_check',
                     credentials_payload)

print(resp.status_code)
print(resp.content)

无论resp包含什么都是服务器的责任。

于 2018-12-16T14:22:04.393 回答