Научитесь пользоваться анализатором протоколов.
Запрос:
POST /api/getAnswer HTTP/1.1
Host: p-bot.ru
Connection: keep-alive
Content-Length: 357
Origin: http://p-bot.ru
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: */*
Referer: http://p-bot.ru/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,ru;q=0.8,ka;q=0.7
Cookie: dialog_id=21f7ab81-87e6-424a-acbf-3a2e3d23d12c; dialog_sentiment=0; last_visit=1538224647229::1538239047229
request=Putin&request_1=&answer_1=&request_2=&answer_2=&request_3=&answer_3=&bot_name=%CF%81Bot&user_name=%D0%9D%D0%B5%D0%B7%D0%BD%D0%B0%D0%BA%D0%BE%D0%BC%D0%B5%D1%86&dialog_lang=ru&dialog_id=21f7ab81-87e6-424a-acbf-3a2e3d23d12c&dialog_greeting=false&a=public-api&b=3289192115&c=2797253453&d=880116423&e=0.9968169951949974&t=1538239063390&x=6.06113829002269
Ответ:
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sat, 29 Sep 2018 16:37:41 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 642
Connection: keep-alive
Access-Control-Allow-Origin: http://p-bot.ru
X-Frame-Options: SAMEORIGIN
{"status":"OK","time":"67 ms","answer":"He is my BFF.","pattern":{"_id":"5b3d93188966a348383b0864","dialog":"f70a712a-c003-4a1b-8b76-a4d249adc8d3","author":"Sykes The Pufferfish","context":"sorry for my english i don t care if you do not want - do not believe but i m not a bot yes you moron do you speak english speak english ","request":"putin ","__v":0,"score":1,"created":"2018-07-05T03:40:08.832Z","useCount":25,"rating":-1,"dislikes":0,"likes":2,"mood":0,"sentiment":0,"mainbase":false,"question":false,"answer":{"set":{"commands":[],"mood":0,"sentiment":0},"variants":["He is my BFF.\n"]},"bot":"roBot","resultAnswer":"He is my BFF."}}
Визуально то же самое:
Запрос из формы:
Ответ:
Т.е. POST на /api/getAnswer. Дальше сами.