Skip to content

Commit

Permalink
Fix samples for updating with custom binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
sindrehan committed Sep 4, 2024
1 parent cc9bc2f commit 4a9bb49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]" "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:
Expand Down

0 comments on commit 4a9bb49

Please sign in to comment.