Coder Social home page Coder Social logo

requestly / requestly Goto Github PK

View Code? Open in Web Editor NEW
1.8K 26.0 148.0 200.89 MB

๐Ÿš€ Most Popular developer tool for frontend developers & QAs to debug web and mobile applications. Redirect URL (Switch Environments), Modify Headers, Mock APIs, Modify Response, Insert Scripts & Report Bugs with debugging sessions.

Home Page: https://requestly.com

License: Other

JavaScript 48.84% Shell 0.13% HTML 0.66% CSS 5.00% Less 0.01% TypeScript 42.48% SCSS 2.85% Handlebars 0.03%
charles-proxy chrome-extension debugging desktop-app edge-extension firefox-extension safari-extension open-source api-client api-rest

requestly's Introduction

Requestly Logo

GitHub closed issues Chrome Web Store Rating Chrome Web Store Reviews Chrome Web Store Downloads Status badge

โšก Build, Test & Debug web and mobile apps 10x faster

Bring the power of Charles Proxy, Fiddler & Postman together with beautiful, modern UI & collaboration features. Available as a browser extension on all major browsers & desktop apps on all platforms. Install Requestly

๐Ÿก Getting Started

๐Ÿš€ What is Requestly

Requestly is an Open-Source platform for front-end developers with essential tooling & integrations that helps them write, test & debug their code 10x faster. Requestly reduces dependency on backend devs and environments for development & testing needs.

Using Requestly, devs can create mock, test, validate & override API responses, modify request & response headers, set up redirects (Map local, Map remote), and use Requestly sessions for faster debugging.

โœจ Features

๐Ÿ‘‰ HTTP Rules (Intercept & Modify HTTPs Requests)

Intercept & Modify HTTPs requests & responses from browsers & mobile apps.

  • ๐Ÿ‘‰ Use the browser extension for capturing & modifying traffic from browsers
  • ๐Ÿ‘‰ Use the desktop app for capturing & modifying traffic from mobile apps & other desktop apps.

Different Modifications supported

  • Rewriting URLs (Map Local & Map Remote) e.g.
    • Change Hostname, QueryParams, etc in the URL
    • Redirect traffic from one environment to another (e.g. production to dev)
    • Swap Tag Manager scripts from production to staging/dev environment
  • Modify HTTP Request & Response Headers
  • Modify API Request & Response body
  • Throttles & Blocking of Requests
  • Inject scripts on web pages

intercept_ _modify_https_requests_-_1280x800_5

๐Ÿ‘‰ API Client

Requestly offers a minimal, lightweight API client that works directly in the browser. It can help you

  • Import cURL requests,
  • Send new requests, and
  • Quickly test API responses.
  • Integration with Mock Server to clone an API endpoint with the same response
  • Integration with Modify Response Rule to override the response body

store_asset_-_api_client_-_1280x800_8

๐Ÿ‘‰ Mock Server (Create API Mocks in seconds)

Mock Server helps you quickly create API mocks. Especially helpful when APIs don't exist and you have to build a feature, just define the response you need and get an endpoint to be used in your code.

mock_server_-_1280x800_4

๐Ÿ‘‰ Sessions

Collaborate with other teammates and get Requestly sessions that contain video, console logs, network logs, and env details for faster troubleshooting.

session_-_1280x800_5

๐Ÿ“• Documentation

Please find our documentation here. Our docs can help with

๐Ÿ‘ฉโ€๐Ÿ’ป Development

This repository contains the source code for Browser extension and UI application which make up the core of Requestly. Please follow the Getting Started Guide to get to know about the development process in this repository.

Start working on individual modules:

๐Ÿ™ Contributing

Read our contributing guide to learn about how to propose bugfixes and improvements, and how the development process works.

For payment/billing related issues, feel free to contact us at [email protected].

๐ŸŽฏ Our Mission

Our mission is to help developers ship web and mobile apps faster and with confidence by giving them the tools to debug & resolve issues without external dependency.

Contributors

All Contributors

Sagar Soni
Sagar Soni

๐Ÿ’ป
Sahil Gupta
Sahil Gupta

๐Ÿ’ป
Vaibhav Nigam
Vaibhav Nigam

๐Ÿ’ป
Parth Bhardwaj
Parth Bhardwaj

๐Ÿ’ป
Rohan Mathur
Rohan Mathur

๐Ÿ’ป
Nafees Nehar
Nafees Nehar

๐Ÿ’ป
Navdeep Singh Rathore
Navdeep Singh Rathore

๐Ÿ’ป
Sachin Jain
Sachin Jain

๐Ÿ’ป
ashishsangle707
ashishsangle707

๐Ÿ“†
Shrey Gupta
Shrey Gupta

๐Ÿ’ป ๐Ÿ“†
Charanaraj N
Charanaraj N

๐Ÿ’ป
Muhammad-Daniyal-Jawad1
Muhammad-Daniyal-Jawad1

๐Ÿ’ป
PIYUSH NEGI
PIYUSH NEGI

๐Ÿ’ป

Special Mentions

A big shoutout to these amazing Open Source projects that have helped make Requestly possible.

requestly's People

Contributors

allcontributors[bot] avatar ashishsangle707 avatar codhek avatar darkwolff71 avatar deepsource-autofix[bot] avatar dinex-dev avatar dnicolson avatar farsen976 avatar itspunkaj avatar kanishkrawatt avatar lazyvab avatar muhammad-daniyal-jawad1 avatar nafees87n avatar ncharanaraj avatar npiyush97 avatar nsrcodes avatar rohanmathur91 avatar runtimeterror10 avatar sachinjain024 avatar sagarsoni7 avatar samantatarun avatar wrongsahil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

requestly's Issues

[FR] Variable support

It would be nice to have the ability to possibly create key/value pairs of variables somewhere to be used in the regex conditions. Has this been considered before?

There are many times when I want my requestly rules to work on the same set of hosts every time. Creating a variable with the regex for these hosts and using it on each new rule would make it easier to maintain and add new hosts to all existing rules.

I don't know how this would work, maybe the variable has the same type of drop-down that the request match has to define what type of variable it is, then on the requestly rule a new option exists in the drop-down to select a variable?

Redirect to open in another browser

It would be great if I could also redirect the link to be opened in another browser.
Special sites like SharePoint are better open in Internet Explorer.
Something to allow a preoption to run a command like
"C:\Program Files\Internet Explorer\iexplore.exe"

"Modify query parameters" is broken in Firefox

I've tried to use requestly to disable new layout on youtube.
I'm using Firefox Quantum 61.0.2. Checked on Linux and Windows machine.
It works as expected in Chromium browser.

Steps to Reproduce:

  • Add the "Modify query parameters" rule with Host Equals www.youtube.com and disable_polymer=1 param.
  • Try to visit https://www.youtube.com.

Actual Behavior:
The page doesn't load. It seems like it loops infinitely.

Expected Behavior:
The disable_polymer=1 parameter is added to the query.

Turning off the rule after visiting https://www.youtube.com yields the expected result.

Enhancement

It would be nice to have a functionality where users can move the requests up and down based on their use.
Right now when a user has multiple requests, its difficult to navigate and search through all the requests.
If there is a way we could just move the requests based on the usage , it would be great

Proxy response

The idea is to be able to proxy the request through a function which can transform the contents of the response.
For example:

  • .SASS files, which are only understood by the browser if transpiled to CSS
  • Accessing any webpage and adding your "taste" to it, for example removing parts of the page (maybe ads?)
  • Beautify .JSON, .CSS and .JS files for better redability

It would be awesome to have this feature, mainly considering Requestly as a platform for "hacking" the way you want to access the web and easily saving it and sharing with other people.

How to rewrite part of url

Can the Extension replace only part of a URL? In the below example, I only need to change dev, test, and build.

Example:
orange.dev.net/
orange.test.net/
orange.build.net/

peach.dev.net/
peach.test.net/
peach.build.net/

I'm dealing with ~15 sites that follow the structure above.

Thx!

Uploading Rules - Quota Exceeded (QUOTA_BYTES_PER_ITEM)

Most people probably don't run into this, but I noticed that when trying to upload a rather large rule export file, the rules page will toast "All rules imported successfully" and show that the rule has been uploaded, but if you refresh the page, it disappears from the list. Upon further inspection, it looks like the quota limits for Chrome's Storage API is getting exceeded.

Attached is a file that you can use to replicate this - requestly_test_json.txt

And here is a quick visual demo:
requestly_quota_exceeded

After a quick peek at background.js it seems like the extension tries to store everything in the "sync" storage area instead of local, correct? If so, a quick fix might be checking the byte size of the transformed contents of the file after upload, and if it exceeds the sync storage quotas, put it in local storage instead and mark some kind of internal flag.

The quotas for local storage are enormous compared to sync, and if you add a special permissions flag to your manifest, it can actually be unlimited. Sync, on the other hand, is limited to a measly 8,192 bytes per item. - Link

As a total sidenote - is there still a public git repo for this extension that is up to date? I see one marked "stale" and I have found some old forks, but I can't seem to find any that are up to date.

What are your favorite redirects?

Hi @sachinjain024. Thanks for creating this powerful extension. I just discovered it.

To better understand some possible uses of it, would you be willing to share some example rules, or even better: your exported list of rules? I am trying to imagine the various interesting ways this thing can be used. :)

Thanks, and keep up the good work.

โœŒ๏ธ

Add to existing header?

Is there a way to add on to an existing header, e.g. add an entry to the cookie header?
I've tried the modify header rule, but couldn't seem to make it work.

Allow cookies to be set/mapped to headers or URL parameter

I would like to request a feature where you can ask a specific cookie value to be set/mapped to a request header or to a URL parameter.

Example:

Given I have cookie FOO=BAR
When a request is made
Then append a "&foo=bar" parameter to related request URL

Given I have cookie FOO=BAR
When a request is made
Then drop a HTTP request header into related request as "x-foo: BAR"

[FR] Inject HTML/CSS

I don't know if this is in the road-map currently, but it would be nice to be able to inject HTML/CSS as we can already with JavaScript.

I am currently using another extension that is very old and has never been updated to do this and would like to get rid of it and just use requestly.

Here is what is currently being used. It works a little like requestly, but really meant for injecting markup/css/js into a page. https://chrome.google.com/webstore/detail/web-override/lllllobkincmdnjfkbknjacacmnlajll

Things that would make a requestly version better is the option of where to inject the CSS instead of how web override does it.

Memory leak...

I noticed that this extension in Chrome, when left running in the background, slowly takes more and more memory, even when not blocking anything, and even when it's disabled. I'm pretty sure there's a memory leak in the code somewhere, considering in the span of a couple hours, it can leak as much as 70MB of memory.

Doesn't work well in mixed HTTPS/HTTP scenarios

The site I'm debugging is fetched over HTTPS. The localhost server that provides replacement assets only supports HTTP.

The latest Chrome (v59) refuses to download replacement javascript because the host page is secure and the javascript URL is insecure. There doesn't seem to be a good way to work around this on a Mac (there is apparently a hack that works on Windows by disabling all Chrome security, but that's a pretty onerous workaround, and in either case it doesn't work on a Mac).

Is there a way for your extension to work around that somehow?

Redirect request not working

I am trying to redirect https://www.google.com to https://vqmvr8fijoybhhtmewjyxw-on.drv.tw/temporary/Google%20substitution/Google.html, which is just my modified version of the google webpage. However, as I used the 'equal' rule it appears not to work. I tried it on more popular websites like https://www.duckduckgo.com and then it works again. Is it just my problem? I am using Request 5.3.0 on Google Chrome 67.0.3396.30. Answers are appreciated and solutions are much welcome. Thank you!

adding the prefix in the rule twice instead of only once

wikipedia.com is blocked by Turkey. There is 0wikipedia.com (which is not blocked) so i thought your app could be a solution for this. (Actually it can be a solution for many websites blocked by many governments)
. So I made a rule, wikipedia to 0wikipedia but your app makes it 00wikipedia and obviously DOS.

Doubled slashes in URL

Hi, problem is, along with corrected edit, I get duplicated slashes where they aren't supposed to be.
The nice thing is the browser ignores it, so this is not as urgent, but I wished to signal the bug anyway.

I have set that rule (to edit language of MSDN / DOC Microsoft pages):
Replace Host or some part of URL
Pairs
Replace /it-it/
With /en-us/
Source Url Contains .microsoft.com/

While getting correctly edited url, I get also slashes duplicated anywhere on that url:
Source URL:
https://docs.microsoft.com/it-it/dotnet/standard/choosing-core-framework-server
Edited URL:
https://docs.microsoft.com//en-us//dotnet/standard/choosing-core-framework-server
I think the bug is reproducible.

Cannot modify Response Header

Trying to modify the response header, in particular by removing X-XSS-Protection but it is not modifying the header. However, it does modify the request header easily.

Chrome header modification after redirect doesn't work anymore

Previously it was possible to create two rules:

  1. Redirect Request from one url to another
  2. Add Access-Control-Allow-Origin response header for certain host, so the request is not blocked by CORS.

But in the past few days the second rule is not working. So after redirect I get the error:
XMLHttpRequest cannot load . Redirect from '' to '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

Wrong validation when user selects host

This is one of the feedback on chrome store:

host source problem
When I select "source" field to "host" and condiction to "equals", I can't enter host like "www.google.com", because I get error "Source Url should begin with a valid protocol (http: | https: | ftp:)".
Of course "https://www.google.com" doesn't work, because it's a url, not a host.

Items

  • Do url validation only is rule source is url and not url host.

Enable data schemes in rules

  • Show rule size on ruleIndex screen
  • Show user the amount of size available in size tooltip
  • Allow data schemes with max length of 500bytes in the destination field
  • Update validation
  • Give notification
  • Inform users by article on medium on size constraints

user agent change

On user agent change the "platform" "os_name" and "os_flavor" are not substituted so the web site knows that user agent is fake

[feature request] Keyboard shortcut

Hi..
Thaks for the cool plugin.
One thing i am missing is the possibility to switch the user agent with a (configurable) shortcut.
Would be nice to be able to configure a shortcut for a defined useragent. If you press the button you switch the UA to something and create a rule for that website implicit.

Thank You

Math operation on part of url

Is there any way to do a math operation on a part of a url?
For eg. if I wanted to increment the page number in a url like
http://www.book.com/book1&page=101
to
http://www.book.com/book1&page=102

Chrome 66 freezes when trying to set unsafe-url Referrer-Policy response header

I am using Requestly 5.3.0 and macOS 10.13.4. I work for a company that puts UI widgets on certain websites. When the user is on one of those websites, their browser make a request to our server, which sends back some JavaScript. It is absolutely essential for our server to get a "Referer" header from the user's browser so we can tell what website they are on.

Usually, that works fine. But for development, I have my own server running on localhost. Normally, browsers will not send a "Referer" header from an https site to a non-https site, so my server won't work. I thought about enabling https on localhost, but that seemed tricky and complicated, so I have been using Requestly to insert a "Referrer-Policy" header with a value of "unsafe-url" in responses from the website I'm testing, so the "Referer" header gets sent to my server.

I have been doing this for about 2 months, and it has been working fine, until I upgraded to Chrome 66.0.3359.181 today. I don't remember what version I was using just before. When this happens, my CPU usage goes up to 100%. I can scroll on the page, but I can't interact with anything on it. Clicking on things on the page does nothing. Clicking the "X" to close the tab doesn't work as usual. If I have the developer tools open, they show a bunch of requests with a status of "(pending)", even though those requests usually finish right away.

If I disable Requestly, this doesn't happen. If I try overriding the "Referrer-Policy" response header with other values, it doesn't happen. I tried all the other valid values I found on the MDN page for this header ("no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin"), as well as nonsense ("asdf"), and the page loaded fine. But if I try "unsafe-url" (the value I need for my testing purposes), the page freezes.

Set Referer to itself?

An image url is https://example.com/any file name (maybe another image on this site).
Can I set this image's referer to itself (https://example.com/any file name)?

Making Default Action Enable/Disable

While working I have to activate and deactivate the plugin frequently. Can you make the Left Click in the extension Icon to Activate/Deactivate the plugin rather than opening the requestly page. Which can be opened via an options menu in the right click context menu.

Multiple replacement steps in a single rule not working

I'm not entirely sure when it stopped working, but I have a single replacement rule setup that has multiple steps in it.

The first rule is to change the entire url to something different with placeholders based on the requested url. The next 20-ish rules are setup to replace the placeholders with different values.

This used to work and no longer does, it appears that the first rule is firing but then stops. There are no conditions on any of these right now, just replacements.

If I keep reloading the page, the other replacement steps fire, but only one at a time. So it takes 3 requests for them to all fire.

Regex is invaild.

e.g:

http://push.gd165.com:8080/\?(?:.*)&surl=http://(.*)

It is a vaild regex.

Redirect with url decode?

For example:

I have a url:

https://disq.us/url?impression=145f21fc-7952-11e7-b0db-002590f37afe&product=email&postrank=1&object_type=thread&variant=active&forum_id=3904601&utm_source=digest&verb=click&event=activity&threadrank=1&adverb=internal&user_id=184751879&zone=digest&thread=5731099126&url=https%3A%2F%2Fblog.cologler.ml%2Fefcb2a59-42ae-4a7e-b1f0-76413e07c6f0%2F%23comment-3449740712%3AajGXx8NyJ4Q_pSzO9hALUjAefIE&section=parent-post-comment-footer&object_id=&experiment=digests

I can use regexp to get this part:

https%3A%2F%2Fblog.cologler.ml%2Fefcb2a59-42ae-4a7e-b1f0-76413e07c6f0%2F%23comment-3449740712%3AajGXx8NyJ4Q_pSzO9hALUjAefIE

Is this possible to redirect to:

https://blog.cologler.ml/efcb2a59-42ae-4a7e-b1f0-76413e07c6f0/#comment-3449740712

Location attribute in HTTP302 response

Hello,

I found that requestly Replace host is not working when the request is starting from a 302 response.
Example:
Requested URL: https://www.pippo.com/index.html
Redirection rule is https://www.pippo.com/ should become http://www.pippo.com/
Request is sent correctly to http://www.pippo.com/index.html
If index.html is a 302 reponse with location attribute "https://www.pippo.com/redirect.html", requestly doesn't send the request to http://www.pippo.com/redirect.html, but it keeps the location value

Thanks
Marco

[FR] use offline options page

Currently:

https://app.requestly.in/rules/ is the options page.

Expected:

chrome-extension://?????/rules/ is the options page.

Reason:

  • Faster.
  • Open without internet.

I get 307 response for preflight requests.

I want to redirect requests of my app to my mock server. Requests would be get, post, put, delete, etc. but I get 307 Internal Redirect as response since the request would send out a preflight request.

Only one of N rules matching the same URL is applied

When defining several rules matching the same URL only one is applied.

Might be related to #27

Use Case
I have an endpoint with more than 30 URL parameters which I want to test with different combinations of parameters. To do so I have put each parameter in its own rule (matching the same endpoint). I have done this to be able to turn each parameter on/off independently. I know I could put all parameters in the "Modifications" section under one rule, but I need to document each parameter with default value, unit and a small description to remember what they do, and -- most importantly -- be able to mix and match parameters. I never run the request with more than 10 out of 30 parameters.

But, when I apply more than one rule, only one is added to the request.

Solutions

  1. The best solution would be to be able to turn a parameter in a Rule on and off, and add the possibility to add some description for each parameter.
  2. Apply all matching rules

URL: http://otpdebug.entur.org/otp/routers/default/plan?fromPlace=Rosenholm++(RB%3ANSR%3AStopPlace%3A62)%3A%3A59.823626%2C10.796493&toPlace=Oppsal++(RB%3ANSR%3AStopPlace%3A5994)%3A%3A59.892835%2C10.84016&time=10%3A47am&date=02-22-2018&mode=TRANSIT%2CWALK&maxWalkDistance=2000&arriveBy=false&wheelchair=false&locale=en&numItineraries=6

Rules

[{
  "creationDate": 1519131750007,
  "description": "Maximum time of pre-transit travel when using drive-to-transit (park and ride or kiss and ride). Unlimited on large graphs the search becomes very slow.",
  "id": "QueryParam_223344550004",
  "name": "/plan maxPreTransitTime 1800 (INFINITE) seconds",
  "pairs": [{
    "modifications": [{
      "actionWhenParamExists": "Overwrite",
      "param": "maxPreTransitTime",
      "type": "Add",
      "value": "1800"
    } ],
    "source": {
      "key": "Url",
      "operator": "Contains",
      "value": "otp/routers/default/plan"
    }
  } ],
  "ruleType": "QueryParam",
  "status": "Inctive"
},
{
  "creationDate": 1519131750007,
  "description": "Max walk/bike speed along streets.",
  "id": "QueryParam_223344550005",
  "name": "/plan walkSpeed 2.0 (1.3) m/s",
  "pairs": [ {
    "modifications": [ {
      "actionWhenParamExists": "Overwrite",
      "param": "walkSpeed",
      "type": "Add",
      "value": "2.0"
    } ],
    "source": {
      "key": "Url",
      "operator": "Contains",
      "value": "otp/routers/default/plan"
    }
  } ],
  "ruleType": "QueryParam",
  "status": "Inctive"
}]

Query keeps adding %3D to the end

Hi there. I'm attempting to use requestly to add "&disable_polymer=true" to the end of any HTML containing "watch?v=" (minus the quotes on both, of course). This is because Youtube removed the "Restore Classic Youtube button" and the only way to look at non-ugly Youtube is to add "&disable_polymer=true" to the end of all HTMLs with it. This solution ALMOST works, but I could use help figuring out this last piece of the puzzle.

What I did:

-Made a new "Modify Query Parameters" rule
-Request URL contains "watch?v="
-Add Param "&disable_polymer=true" Value [blank]

The result is that it DOES add the "&disable_polymer=true" to it, but for some reason it ALSO adds %3D, which negates the other suffix unless I manually remove it. I would really appreciate learning where I went wrong on this. Thank you!

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.