Skip to content

Instantly share code, notes, and snippets.

@jbd70
Created April 2, 2019 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbd70/d64fa18475fecc516caba358594ca198 to your computer and use it in GitHub Desktop.
Save jbd70/d64fa18475fecc516caba358594ca198 to your computer and use it in GitHub Desktop.
require "http"
req_body = {:CurrentPw => "pass2", :NewPw => "pass2"}
url = "http://localhost:8096/emby/Users/82bc8a4f1574fsfs6ef8a655eae5e7a/Password"
auth = %Q[MediaBrowser Client="", Device="", DeviceId="", Token="032492245fbe421321adb9ea7aa46e"]
req = HTTP.headers("Content-Type": "application/json", "X-Emby-Authorization": auth).post(url, :body => req_body.to_s)
@jbd70
Copy link
Author

jbd70 commented Apr 2, 2019

req_curl.sh

curl 'http://localhost:8096/emby/Users/82bc8a4f1574fsfs6ef8a655eae5e7a/Password' --verbose \
-H 'Content-Type: application/json' \
-H 'X-Emby-Authorization: MediaBrowser Client="", Device="", DeviceId="", Token="032492245fbe421321adb9ea7aa46e"' \
--data-binary '{"CurrentPw":"pass2","NewPw":"pass2"}' --compressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment