L
L
LebedevStr2019-04-19 21:03:22
API
LebedevStr, 2019-04-19 21:03:22

How to simulate a POST request?

Hello.
There is a page:
https://golodnyikorol.yp.ru/
After clicking on "Show" the phone number.
I see that the following request was sent:

Request URL:https://golodnyikorol.yp.ru/ajax/GetPhoneByContactId
Request Method:POST
Status Code:200 OK
Remote Address:95.213.193.148:443
Referrer Policy:no-referrer-when-downgrade
Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Fri, 19 Apr 2019 17:59:09 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified:Mon, 01 Apr 2019 02:00:00 GMT
Pragma:no-cache
Server:nginx/1.12.1
Set-Cookie:name_en=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie:name_en=spb; path=/
Strict-Transport-Security:max-age=0
Transfer-Encoding:chunked
X-Powered-By:PHP/7.0.27
Request Headers
view source
Accept:text/html, */*; q=0.01
Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.9,ru;q=0.8
Connection:keep-alive
Content-Length:19
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:_ym_uid=1555694904588062042; _ym_d=1555694904; _ym_isad=1; _ym_visorc_11553517=w; mapConfig=%7B%22state%22%3A%7B%22center%22%3A%5B59.93769%2C30.313622%5D%2C%22zoom%22%3A16%2C%22controls%22%3A%5B%5D%7D%2C%22options%22%3A%7B%22avoidFractionalZoom%22%3Atrue%2C%22maxZoom%22%3A23%2C%22minZoom%22%3A4%7D%2C%22placemarks%22%3A%5B%7B%22geometry%22%3A%5B0%2C0%5D%2C%22properties%22%3A%7B%22balloonContentHeader%22%3A%22%3Ca%20href%3D%5C%22%2F%5C%22%3E%D0%90%D0%A4%D0%98%D0%A8%D0%90.%D0%9C%D0%90%D0%A0%D0%9A%D0%95%D0%A2%3C%2Fa%3E%22%2C%22balloonContent%22%3A%22%3Cb%3E%D0%90%D0%B4%D1%80%D0%B5%D1%81%3A%3C%2Fb%3E%D0%A1%D0%B0%D0%BD%D0%BA%D1%82-%D0%9F%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3%3Cbr%3E%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cb%3E%D0%A2%D0%B5%D0%BB%D0%B5%D1%84%D0%BE%D0%BD%3A%3C%2Fb%3E%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D'js%3A%3B'%20class%3D'js-phone-display%20js-utm-ignore'%20data-id%3D'18165024'%20id%3D'phone-18165024'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxData%3D'contact_id%3D18165024'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxUrl%3D'%2Fajax%2FGetPhoneByContactId'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxBlockerMode%3D'no'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxDataType%3D'html'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxReceiver%3D'%23phone-18165024'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data-uiAjaxActionType%3D'html'%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3E%2B7%20(911)%20%20723-XX-XX%20-%20%D0%BF%D0%BE%D0%BA%D0%B0%D0%B7%D0%B0%D1%82%D1%8C%20%D1%82%D0%B5%D0%BB%D0%B5%D1%84%D0%BE%D0%BD%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fa%3E%22%7D%2C%22is_adv%22%3A%221%22%7D%5D%7D; PHPSESSID=8mccpga7cep8o659s5fb73rmo7; _width=1349; _height=662; name_en=spb
Host:golodnyikorol.yp.ru
Origin:https://golodnyikorol.yp.ru
Referer:https://golodnyikorol.yp.ru/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
X-Requested-With:XMLHttpRequest
Form Data
view source
view URL encoded
contact_id:15082694

Tell me how to simulate a request through, for example, the
https://reqbin.com/
service. I don’t see cross allow origin in the headers, which means that perhaps there is no protection for a request "from outside".
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-04-19
@inoise

Postman, Insomnia

Z
Zakharov Alexander, 2019-04-19
@AlexZaharow

Another fiddler can:
5cba10d328b6f821891480.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question