Coder Social home page Coder Social logo

waboodoo / http-shortcuts Goto Github PK

View Code? Open in Web Editor NEW
973.0 31.0 104.0 21.9 MB

Android app to create home screen shortcuts that trigger arbitrary HTTP requests

Home Page: https://http-shortcuts.rmy.ch

License: MIT License

Kotlin 90.79% HTML 9.03% CSS 0.11% Python 0.07%
android http-requests http http-client home-automation

http-shortcuts's Introduction

HTTP Shortcuts for Android

HTTP Shortcuts

GitHub release (latest SemVer) F-Droid Downloads Ratings Crowdin

A simple Android app that allows you to create shortcuts that can be placed on your home screen. Each shortcut, when clicked, triggers an HTTP request, with the possibility to process and display the response in various ways.

Get it on Google Play Get it on F-Droid

or download the latest APK directly.

Find more information and documentation on the official website.

Support this app by helping me translate it or by becoming a Beta Tester!

Features

  • Supports HTTP and HTTPS, and methods GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS and TRACE
  • Basic Authentication, Digest Authentication & Bearer Authentication
  • Custom request headers
  • Custom request body (text based, from static file, file picker, static, or camera)
  • Upload files as form-data parameters
  • Client Certificate Authentication
  • Support for TLSv1.3
  • Support for HTTP & SOCKS proxies
  • Support for Self-Signed Certificates & Certificate Pinning
  • Use a built-in icon or a custom image
  • Display response as a toast, window or dialog, or run silently
  • Display response as HTML-formatted text, as image or as web page
  • Grouping into categories through tabs
  • Value injection through variables (e.g., text, numbers, passwords, selections, colors, dates, …)
  • Import & Export in JSON or cURL format
  • 3rd party integration support (e.g. Tasker, Macrodroid or Wireguard)
  • Dark Mode support
  • Easy remote editing on a computer via the web editor
  • Event history to see details about recently executed HTTP requests & responses
  • Run arbitrary JavaScript before & after execution, which allows for lots of customization with features such as:
    • compute values such as timestamps, random numbers, UUIDs, hashes, HMACs, base64, etc.
    • parse JSON, HTML or XML and extract data from it
    • show toast message or message dialogs
    • vibrate or play notification sounds
    • trigger other shortcuts to chain multiple HTTP requests
    • interact with other devices and services by sending TCP or UDP packets, MQTT messages or using Wake-on-LAN

See also the Changelog for the latest additions and updates.

Screenshots

Main Screen Creation Menu Shortcut Editor Built-In Icons Authentication Settings Scripting Code Snippet Picker Categories Variables Variable Editor Settings Import / Export Display Response with Meta Data

http-shortcuts's People

Contributors

2219160052 avatar edufolly avatar flavien06 avatar granoeste avatar hdelei avatar idmadj avatar tadwohlrapp avatar waboodoo avatar wldata avatar xnyapae3 avatar yalab 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  avatar  avatar  avatar  avatar

http-shortcuts's Issues

Improve response handling

Add additional options for how to process the request responses:

  • Save to file
  • Syntax highlighting
  • Open in appropriate app (e.g. gallery for images)

Allow to send cookies

It will be great to allow to send data through cookies (like using - - cookie option in curl).
In my case to log into a wifi, I have to send my credentials + a "accept_disclaimer" cookie - otherwise I'm forced to do another request.

Option to force network requests go through WiFi instead of mobile network

When I'm connected to a WiFi hotspot (that requires web based login), it seems that Android (5.0.2) will forward requests over other networks (3G/4G for example) instead the hotspot, since the hot spot has no internet connection.

Would it be possible to add an option to force HTTPS requests through WiFi?

The solution seems simple, but I am not capable of implementing it:

http://stackoverflow.com/questions/39311853/android-force-network-requests-go-through-wifi-instead-of-mobile-network

Handshake failed for nginx ssl option ssl_ecdh_curve secp384r1

I've setup my API with nginx server as a reverse proxy following a tutorial for perfect score on ssllabs.com. Using HTTP-Shortcuts I can't connect to my API getting the error "Handshake failed". I tried to disable my custom ssl options one by one to find the issue. And it is the config option "ssl_ecdh_curve secp384r1".

I don't know if this is specific for your app or a general issue with Android but at least I wanted to inform you.

Color picker

Add a color picker type for variables, e.g. for RRGGBB values.

CURL import/export

Add a feature to export shortcuts as CURL commands, or import them from CURL commands.

advanced variable type

Maybe we can use one shortcut's response as a variable. There are many request required a challenge, ID or something like that. It will be very useful if we can use one shortcut(A)'s response as a variable for other shortcut(B). Before we execute B, sending A first to get a response and use the response as an input value for B to execute.

Edit

Hello I noticed something.
When a shortcut is made and you press and hold it and click on edit, the fields are empty.
But when you duplicate the shortcut and press and hold the duplicated shortcut and click on edit the fields are filled like when first created.

Feature Request: Response in browser

Hi, I use HTTP-Shortcuts to simulate some requests, but the form of the response is not easy to see

I want to be able to view it in a browser, like chrome, and I did not find this feature in the software, but I am sure this feature is still very useful.

Seemingly indirectly through the tasker, but this is very tedious, so I hope can provide native support

Thanks

Feature request: add a location variable

Hi,
I would like to add a new kind of variable, that contains the current device position at the moment the shortcut is triggered. My idea is to make it similar to color picker: it could show a little "open map" with the current position and a pin that can be moved on the map. The OK button, extract the position of the pin and send it in the body of the request as a Json.
I will start to develop it in the next days, if you agree.
Thanks.

Flavio

problem connecting to https with certifcate signed by custom ca

I have a shortcut that posts to a HTTPS URL. The server has a certificate that is signed by a custom certificate authority. I've added this CA cert to Settings > Security > Trusted Credentials on my android device. This allows chrome to connect to the server and verify the certificate chain. HTTP-Shortcuts fails with the following:

power cycle failed: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

This configuration worked in a previous version of the software, but I am unsure what version that was.

Feature Request: Share Intent

Hello,
first of all thanks for this app. It's a great companion for personal iot stuff. Something very cool would be to add sharing support. For instance, you are on an application like Twitter and you want to share a tweet. You choose "HTTP Request Shortcuts" as share intent, Then the widget propose all the shortcuts able to send data (mainly POST requests). And when you choose the shortcut, the content of the share intent is sent to the HTTP endpoint. Then your personal backend (NodeRED or whatever) would be able to decode the http body and do some clever stuff. You could imagine several use cases: post a photo, archive text, trigger some action depending the data sent.
What do you think ?

Iconpacks

It should be possible to select an icon from an icon pack.

Grid view

Add an option to show shortcuts (per category?) as a grid instead of as a list.

Relax URL validation

I defined variable {{do}} to be http://gate/do and made a shortcut using {{do}}?a=b.
Upon run/save it says I entered invalid URL.
Please consider expanding URL before validation.
TIA

feature request: save cookie and multiple requests

Hi,

what a great app! I have to interact with a web that requires auth via form and then keeps cookie for following requests. Any chance i can make shortcut recipe with multiple requests, where i would define variables (for the auth) for the first request (this i can do already) save the cookie and re-use the cookie for following requests (with variables)?
Perhaps it's already possible and i just missed it?
thank you!

POST http requests fail

I have a POST request that used to work for a few months and ever since the last app update it says: " super.getBody() must not be null"
Thanks

One Shortcut to open multiple urls

First off, thank you for such a handy app.

I have urls that activate devices around my home so having easy to create and access shortcuts is extremely handy.

I currently have to press 3 shortcuts when I get up in the morning (tv,hifi,lamp) so is it possible to combine these urls into one shortcut? Being able to have to create scenarios like 'waking up' (turns everything on) and 'bed time' (turns everything off) would be very handy.

"I recommend Elixir 2 - Widgets, which I personally use to combine multiple shortcuts into a nice looking widget."

I had a look at this but cant get my head around it... Does Elixir integrate with your HTTP Shortcuts or do you mean it will combine multiple shortcuts independently of HTTP Shortcuts?

This help request is maybe outside you're remit but I got tired of searching for something that I thought should be easy.

Any help appreciated.

Thanks.

send request without internet connection

Hi,
Thanks for the great app.
Currently there's only two options for the question, "When not connected to the internet"

  1. drop the request
  2. wait for connection

Can we add the option for sending request without internet connection?
I would like to use HTTP-Shortcuts to send authentications to the wifi service provider(there's a page asking for login). So before the wifi authentication passed, there's no any internet connection.
Thanks.

Feature Request: Pass data to and from the Tasker plugin

The main reason I will be using this app is for its Tasker plugin, and more specifically, focusing mostly on POST requests. It would be a tremendous help if I can pass data via Tasker variables into HTTP Shortcuts so that it could make the appropriate request. My usage consists of a number of similar endpoints that vary only slightly, and also, of course, expect different data in the bodies.

On the same note, having the response available for use in Tasker would also make sense to verify that all went well.

TCP sockets remain in CLOSE_WAIT

Hi,

it seems that the TCP sockets used for the HTTP connections are not properly closed.
After each request, the (new) socket remains in the "CLOSE_WAIT" state (check netstat in a terminal emulator).

If you have a small embedded device a few requests and therefore a few open TCP connections might result in a DOS for that device since it can not accept any more TCP connections (think 8 bit AVR).

The current solution is to force quit/kill the application in order to allow the garbage collector to close all the open connections.
For my device, the concurrent TCP connection limit is 3, which means after 3 requests using HTTP-Shortcuts I have to force quit the application to make more requests.

Steps to reproduce:

  1. Make some requests
  2. Check netstat | grep CLOSE_WAIT

Allow self-signed certificates

Currently you can only use the app with self-signed certificates if you import them to your local certificate storage. An option to trust them would be appreciated.

Shortcuts with parameters

Create shortcuts where upon invoking them the user is prompted with a previously user-defined list of options so choose from. The selected option is then inserted into the request, either as part of the URL or part of a request parameter.

Example:
Click thermostat shortcut -> select "20°C" -> URL "http://my-thermostat?temperature=20" is requested

Authorization

I just found your app and it fits a very useful need for me. I am manually adding an authorization token header into the app in order for it to send post requests to an API. Wondering if there might be a way to integrate this and make it easier. Wanted to ask/discuss.

Can't create multiple shortcuts on Wiko Launcher

On my Wiko Rainbow Jam (Android 5.1) it is not possible to create multiple shortcuts. One works fine. When I want to add another one, a toast appears saying that the shortcut was placed. Checking the homescreen afterwards, no new shortcut has been added.

Feature request: Option to forget variable number

Currently an input number is remembered and presented as default at the next input request. But if this is a secret to open my door, then I would like the number to be forgotten. So I would like an option to forget it.

Better icon

The current icon is not very Material Design and doesn't have any personality. Let's redesign it!

dynamic icon change.

Do you think would be hard to have the icon changing based on a specific response? This to avoid having multiple shortcuts for a single switch-toggle operation.

I did a similar app in the past, using Android widgets and changing widget background-img based on the http response. I think it could be a useful feature.

PS. I'm recommending this app to all the users using my https://github.com/roccomuso/iot-433mhz home automation system. :)

Toggle-Shortcuts

Add special shortcuts that toggle between two different requests.

Feature: Slider Variable

It would be nice to have a numeric slider type variable with definable min, max and step values.

Android Wear support

Would be super-cool to be able to toggle http post requests from an android wear watch. Especially for IOT applications. What do you think? Please add it :D, since you app works good.

Post form support

Correct me if I'm wrong, but I haven't been able to post form data (curl -F or --form option).

Feature Idea: Provide multiple HTTP Action per Widget

This app works great and I could control all my house automation system perfectly right from my Android home screen :-)

It would be very handy if it would be possible to define different actions for click patterns:

  • single touch
  • double touch
  • long touch

Or somehow a list of possible actions on one widget one does a long touch action ...

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.