Quickest way to send a PUT request to self-signed service?

What would be the quickest way to send a PUT request to a self-signed service?

I want to do this to turn off a warning via my iPhone. Initially I thought this could be done using Shortcuts or Scriptable, but both fail on the fact that this particular service (that I do not have control of) uses a self-signed certificate, which is not trusted by iOS. Therefore, both Shortcuts and Scriptable refuse to perform the request.

For now I can send the request as a favorite in HTTPBot (which has a setting to not “verify SSL”), but this App does not have a widget and does not support Shortcuts.

Any other/better way to do this?

Ah, solving it myself in 5 lines of Python in Pythonista where I can use verify=False (to disable verifying SSL certificates) in requests.put from the Requests module.

Next, donate that Python script to Shortcuts/Siri and you can disable the warning via voice control :slight_smile:


I’d like to do this in Scriptable as well…

@simonbs Would it technically be possible to support skipping SSL validation?

(If so, would you consider this?)

Accidentally discovered that the “Request” module now has a property “allowInsecureRequest” which does exactly this. Thanks! Ported the Pythonista script to Scriptable :slight_smile:

PS: @simonbs I wanted to add a link here to the documentation of this property, but I get “Error 525 - SSL handshake failed” when trying to access the Scriptable website…

Sounds like it cloud have been a hiccup in Cloudflare. It seems to work now. Does it work in your end as well?

Yes, everything OK again.

(And apologies for the late reply)

1 Like