With the number of growing users, this is one of the most popular feature request we have received. There is no simple solution where you can host your JS, CSS files and refer them in your code. So, Requestly users faced problems when they wanted to redirect some script to script in local filesystem. They had to setup their own localhost server and get the url. But now this problem is solved using Requestly Library Service and now you can upload your JS/CSS/other files with the help of this service and get the url of uploaded file which you can directly use in requestly rules.
How to use Library Service ?
When you navigate to the library service it will ask you to login using your google account. This is required to prevent abuse of service and to manage/organize your files on Requestly servers.
You can upload a file from your file system using upload button.
After you have uploaded a file, you will see a dialog with the details of the file. You can click on Download Url Icon to copy the url of the file.
Once you have uploaded your file, you can also edit the content from File Editor. Just Click on
Edit File Content button in File Details Dialog as mentioned above and you will see a file editor like this –
As you can see Requestly File Editor supports a lot of features like :-
- Syntax Highlighting
- Error Highlighting
- Supports Multiple Languages
Create New File
You can also create a new file (JS/CSS/JSON) using Add button on the toolbar. When you click on the toolbar, it will show a dialog to fill file details.
And now you can add file content which will again take you to file editor.
How to use Library in Requestly Rules ?
Once you have uploaded your files in Library, you can get the download url of the file. You can use that url in Requestly rules like Redirect Rule & Script Rule.
- Our Library Service is deployed using Google’s CDNs so you will also get best performance.
- Requestly Library is a standalone service so if you are not using extension even then you can use Library Service to host JS/CSS and other file types.
- You can use Library files in your other projects as normal scripts and also include them in your web pages.
- You can share the scripts with your other co-workers.
Q: If I change file content, will the Url change ?
That’s all to cover in this article. Feel free to reach out to us for any questions you have. Drop a comment if you have any suggestions to improve this post.