ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.39k stars 178 forks source link

Plugin feature #131

Open NghiaTranUIT opened 5 years ago

NghiaTranUIT commented 5 years ago

🐶 Brief

Inspired from Paw, it has a capability to extend the features if need by providing the plugins.

It means that those plugin-features is optional, and doesn't affect to the complexity of the app.

We should support the basic plugins-market, to help use download and install easily.

Built-in Plugins:

👑 Criteria

muizidn commented 3 years ago

any update on this?

NghiaTranUIT commented 3 years ago

Hey, we decided to put this ticket in Backlog since we have more important features for 80% of total user-cases.

We release the first version of the Plugin feature, it's called "Scripting" (https://docs.proxyman.io/scripting/script)

NghiaTranUIT commented 3 years ago

Just wondering @muizidn, let imagine that the Plugin feature is released. What is the Plugin are you looking for at first glance? 🤔

I will collect the request and have a plan to implement it soon 😄

muizidn commented 3 years ago

😅. I would like to convert all my pinned endpoints into Moya target or Retrofit api. Scripting looks cool!

NghiaTranUIT commented 3 years ago

@muizidn Look like Code Generate is possible with httpsnippet (https://github.com/Kong/httpsnippet). It's easier to integrate to Proxyman without implementing the Plugin, which is a huge feature 😄

Let me consider and support httpsnippet code

monavari-lebrecht commented 1 year ago

I am looking forward for the plugin section as well :)

In OData we have batch requests, that collect multiple requests in one $batch and the response looks like this:

HTTP/1.1 200 OK
X-Powered-By: Express
access-control-allow-origin: http://localhost.proxyman.io:4004
x-correlation-id: a03555f2-4869-48c8-8931-7895fbdf2c02
OData-Version: 4.0
content-type: multipart/mixed; boundary=batch_id-1673453844670-135
Date: Wed, 11 Jan 2023 16:17:24 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked

--batch_id-1673453844670-135
content-type: application/http
content-transfer-encoding: binary

HTTP/1.1 200 OK
odata-version: 4.0
content-type: application/json;odata.metadata=minimal;IEEE754Compatible=true

{"@odata.context":"$metadata#HistoricBasketPositions(qaBlob,ID)/$entity","qaBlob":"[{\"q\":\"Art der Bestellung\",\"t\":\"select\",\"a\":\"FREETEXT\"},{\"q\":\"Kontierungstyp\",\"t\":\"select\",\"a\":\"K\"},{\"q\":\"Geschenk\",\"t\":\"radio\",\"a\":\"Nein\"},{\"q\":\"Veranstaltung\",\"t\":\"radio\",\"a\":\"Nein\"},{\"q\":\"Warengruppe\",\"t\":\"select\",\"a\":\"19010103\"},{\"q\":\"Kostenstelle\",\"t\":\"valuehelpinput\",\"a\":\"H0010918\"},{\"q\":\"Preis\",\"t\":\"textfield\",\"a\":\"25\"}]","ID":"9dea149d-5f71-4b0d-867a-e369687c2ba0","QAs":[{"q":"Art der Bestellung","a":"FREETEXT"},{"q":"Kontierungstyp","a":"K"},{"q":"Geschenk","a":"Nein"},{"q":"Veranstaltung","a":"Nein"},{"q":"Warengruppe","a":"19010103"},{"q":"Kostenstelle","a":"H0010918"},{"q":"Preis","a":"25"}]}
--batch_id-1673453844670-135
content-type: application/http
content-transfer-encoding: binary

HTTP/1.1 200 OK
odata-version: 4.0
content-type: application/json;odata.metadata=minimal;IEEE754Compatible=true

{"@odata.context":"../$metadata#HistoricBasketPositions_QAs(up__ID)","value":[]}
--batch_id-1673453844670-135--

So in the body is (wrapped in something like this --batch_id-1673453844670-135) for each intern request the header code and then some json.

Important for us is most of the time the json part, so we would love to see it well formatted.

For better understanding. This is the POST payload of the request:

--batch_id-1673453844670-135
Content-Type:application/http
Content-Transfer-Encoding:binary

GET HistoricBasketPositions(9dea149d-5f71-4b0d-867a-e369687c2ba0)?$select=qaBlob HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

--batch_id-1673453844670-135
Content-Type:application/http
Content-Transfer-Encoding:binary

GET HistoricBasketPositions(9dea149d-5f71-4b0d-867a-e369687c2ba0)/QAs?$select=up__ID&$skip=0&$top=100 HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

--batch_id-1673453844670-135--
Group ID: $auto.Heroes
NghiaTranUIT commented 1 year ago

Thanks for the sample @monavari-lebrecht.

If I understand correctly, you would like to use the Plugin to show a batch request as multiple separated requests on the app?

Currently, Proxyman shows Multiple Parts and you can prettify the JSON string as well. Here is the video: https://www.dropbox.com/s/mew5kndo6kdxvrg/CleanShot%202023-01-13%20at%2011.12.19.mp4?dl=0