M
M
malvin2018-08-23 14:24:37
Fiddler
malvin, 2018-08-23 14:24:37

How to copy ready-made code for requests from Fiddler?

Postman has a very handy feature that produces a ready-to-use request code with all the data.
5b7e9903f1eff273339437.png
Is there something similar in Fiddler?
Now he gives out the same headers in this form

POST /CmcFrontEnd/consulta/busqueda.cmc HTTP/1.1
Host: www.cmc.gov.co:8080
Connection: keep-alive
Content-Length: 28
Cache-Control: max-age=0
Origin: http://www.cmc.gov.co:8080
Upgrade-Insecure-Requests: 1
DNT: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://www.cmc.gov.co:8080/CmcFrontEnd/consulta/busqueda.cmc
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,ru;q=0.8,uk;q=0.7
Cookie: PHPSESSID=2ba8dsre6l42un95qu33k09ud6

You have to put quotes and brackets in order to use it in your code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-08-23
@dimonchik2013

header = dict((x.split(': ')+[''])[:2] for x in fiddler_header_text if 
         all([not x.startswith('POST'), not x.startswith('GET'), len(x.strip()) != 0]))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question