Git Product home page Git Product logo

Comments (7)

mdpl2426 avatar mdpl2426 commented on August 13, 2024 1

@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.

mdpl2426 avatar mdpl2426 commented on August 13, 2024

@Jonahss It will be very helpful if you suggest anything and can we print the response body in JSON format?

from mitmproxy-java.

Jonahss avatar Jonahss commented on August 13, 2024

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.

mdpl2426 avatar mdpl2426 commented on August 13, 2024

@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.

Jonahss avatar Jonahss commented on August 13, 2024

So what is the difference between the packets returned by charlesproxy and the packet returned by mitmproxy-java?

from mitmproxy-java.

Jonahss avatar Jonahss commented on August 13, 2024

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.

jorgemoma avatar jorgemoma commented on August 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.