Comments (7)
@Jonahss I figured out the issue, Actually I was mocking OPTIONS call instead of GET call. Now its working fine and able to see expected screen on UI. Thank you for your support!
Now is there any way to integrate enterprise jenkins with mitm for bulk run and reporting?
from mitmproxy-java.
@Jonahss It will be very helpful if you suggest anything and can we print the response body in JSON format?
from mitmproxy-java.
I think the body of the response is just a byte array. So if you want to have that as JSON, find a library to convert a byte array to JSON.
It sounds like you're getting an error screen because the body you are setting is not valid JSON?
Make sure you are setting the body to a JSON string, like {"foo": "bar"}
.
I suggest using your browser developer tools to inspect the body of the response you are getting back. Make sure it is valid JSON.
sure you can add setHeaders(). I think you can just do that by adding the right annotation to this file: https://github.com/appium/mitmproxy-java/blob/master/src/main/java/io/appium/mitmproxy/InterceptedMessage.java#L37
from mitmproxy-java.
@Jonahss : Thank you for your reply!, yes I converted byte array to JSON and printed, it is the correct JSON.
Manually I am able to see correct UI screen by changing response code and response body through Charlesproxy. The same way I am trying in mitmproxy-java, using setStatusCode and setBody. After setBody validated the JSON, it is correct. But not getting the expected message on the UI.
from mitmproxy-java.
So what is the difference between the packets returned by charlesproxy and the packet returned by mitmproxy-java?
from mitmproxy-java.
Great! Glad you were able to figure it out. Debugging this sort of thing is very difficult.
I'm not sure about enterprise jenkins, but there should be a way. You might have to create a custom plugin or something.
from mitmproxy-java.
Hi @mdpl2426,
I'm having the same issue intercepting and rewriting the responseBody but not seeing the change in the UI. Currently using Appium & Selenium
How did you changed mocking OPTIONS call instead of GET call ?
@Jonahss this is also related to this open issue : #17
from mitmproxy-java.
Related Issues (17)
- can not create object from your package HOT 10
- Unable to capture request and response in iOS execution using appium and java HOT 3
- How use it is javafx? HOT 1
- How set Upstream Proxy?
- There will be a CROS problem
- Support for Mitmproxy V5 HOT 1
- How to capture Har format
- Unable to reflect response in android app using appium and Java HOT 1
- Version 2.0.2 not availabe on maven HOT 7
- can not install certificate HOT 5
- Maven, MitmProxy version 9: AttributeError: module 'mitmproxy.http' has no attribute 'HTTPResponse' HOT 16
- ModuleNotFoundError - websockets
- Update Readme Version HOT 2
- Proxy with Selenium HOT 21
- No module named 'websockets' HOT 6
- 我调试SimpleTest方法时messages总是0 HOT 1
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 mitmproxy-java.