Comments (4)
There is no documentation on what variables there are. Please add it somewhere. How am I supposed to get the body of the request in the same format that fiddler show it when I drag a session to the Composer tab?
@stackedUI you didn't mention what are you trying to achieve by getting a Composer like request body.
MockingBird is an extension and like any other extension it extends existing functionality. This method shows how to get the request body as HTML encoded string. Each selected session in this extension inherits from Fiddler.Session class, which means you can use all the properties exposed by this class. e.g. this default template example is looping through all the RequestHeaders
of session class instance.
In addition to above, please note that the request body is a binary data and the consumer of this data would need to decide how to parse it either by knowing what exactly the content type will be or having a switch case on request header's content type.
Documenting Fiddler classes is beyond the scope of this extension and you can explore https://www.telerik.com/fiddler for more details. You can look at Telerik FiddlerScript Editor to find out all the properties each object has
from mockingbird.
I would like to have the body in a format where I could copy it directly to something like curl and make a request with. I also would like it to be human-readable unlike something like RequestBodyAsHTMLEncode. I know there is an export to curl function but I would like to use it for other things as well so I need this functionality.
from mockingbird.
I would like to have the body in a format where I could copy it directly to something like curl and make a request with. I also would like it to be human-readable unlike something like RequestBodyAsHTMLEncode. I know there is an export to curl function but I would like to use it for other things as well so I need this functionality.
The Session object has a method GetResponseBodyAsString or GetRequestBodyAsString which can be used like below:
{{#SelectedSessions}}
{{{GetRequestBodyAsString}}}
{{/SelectedSessions}}
Note that i've used {{{ }}} (i.e. 3 braces) to get request body without HTML encoding. if I use {{GetRequestBodyAsString}} i.e. 2 braces then the value will be by default HTML Encoded.
if you are interested in more properties and method then you can go to Fiddler > Rules > Customize Rules which should open the Fiddler Script editor and on right side you can see the session object with all the possible properties and methods that you can use:
from mockingbird.
i've also added a most used variables section to the wiki
https://github.com/hemantsharma-io/MockingBird#most-used-variables
from mockingbird.
Related Issues (12)
- Images not appearing in README.md
- Add JmeterLoadTest.tpl template to solution
- Add a feature to replace text in source with custom ones to support more customization
- HTTP request to JMX template missing request headers
- JMeter Load Test.tpl missing HTTP request body contents
- Add helper methods to Html encode Request and Response body
- Extension load failure if script path contains spaces
- MockingBird tab not showing in fiddler v5.0.20192.25091 for .NET 4.6.1 HOT 3
- Is there any document listing all of the available parameters that can be used in the template? HOT 3
- I do not see the extension in fiddler HOT 2
- Multiple requests created multiple Threads HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mockingbird.