Skip to content

Fixed CleverBot#181

Merged
dmptrluke merged 1 commit intoCloudBotIRC:masterfrom
tmfksoft:patch-1
Aug 18, 2015
Merged

Fixed CleverBot#181
dmptrluke merged 1 commit intoCloudBotIRC:masterfrom
tmfksoft:patch-1

Conversation

@tmfksoft
Copy link
Copy Markdown
Contributor

Add the ability to catch non-http 200 responses such as 404 and fixed it to make it work.
It appears the API Requires cookies (such as a session key) to respond with anything other than a 404.
Fixing this was as easy as throwing a GET to the CleverBot homepage while using Requests session handling.
Then using this with the POST requests to forward cookies to the API.

TD:LR; The API expects specific cookies set by the homepage. Lack of cookies results in a 404

Add the ability to catch non-http 200 responses such as 404 and fixed it to make it work.
It appears the API Requires cookies (such as a session key) to respond with anything other than a 404.
Fixing this was as easy as throwing a GET to the CleverBot homepage while using Requests session handling.
Then using this with the POST requests to forward cookies to the API.

TD:LR; The API expects specific cookies set by the homepage. Lack of cookies results in a 404
dmptrluke added a commit that referenced this pull request Aug 18, 2015
@dmptrluke dmptrluke merged commit 075a2f9 into CloudBotIRC:master Aug 18, 2015
linuxdaemon pushed a commit to linuxdaemon/CloudBot that referenced this pull request Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants