diff --git a/http-api.yml b/http-api.yml index 5bdae0c4..1b88fc0a 100644 --- a/http-api.yml +++ b/http-api.yml @@ -1036,12 +1036,13 @@ paths: x-codeSamples: - lang: "curl" source: | - curl -X POST "http://192.168.1.101/surface_unit/update" --data-binary "@firmware.bin" + curl -X POST -F "update-file=@firmware.bin" "http://192.168.1.101/surface_unit/update" - lang: "Python" source: | import requests with open("firmware.bin", "rb") as f: - response = requests.post("http://192.168.1.101/surface_unit/update", data=f) + files = {'update-file': f} + response = requests.post("http://192.168.1.101/surface_unit/update", files=files) print(response.status_code) components: