Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples #24

Open
cirrus-up-cloud opened this issue Feb 15, 2018 · 5 comments
Open

Add examples #24

cirrus-up-cloud opened this issue Feb 15, 2018 · 5 comments

Comments

@cirrus-up-cloud
Copy link

Please, can you add an example for each API?
It's quite hard to debug this framework otherwise.

@Radzhab
Copy link

Radzhab commented Feb 20, 2018

please add some examples. I am c# developer and its hard understand how work /add method

@ajlovell
Copy link

the usage of add does not seem to match the documentation

@dozham
Copy link

dozham commented Oct 30, 2019

Tried to upload a file using the /add API:
curl -XPOST -F 'image=@/opt/some-image.jpg' localhost:8888/add
The request fails and outputs:
{"status": "fail", "error": ["bad request"], "method": "", "result": []}
Is there any specific details that I'm missing?

@the-jojo-jj
Copy link

@dozham, did you find the way to add image?

@dozham
Copy link

dozham commented Mar 7, 2021

@the-jojo-jj I did.
Try this:
curl --location --request POST 'localhost:8888/add' --header 'Content-Type: application/x-www-form-urlencoded' --form 'image=@"/path/to/file.png"'

or if you just want to use the filepath text parameter, replace this line:
--form 'image=@"/path/to/file.png"'

with the following:
--form 'filepath="/path/to/file.png"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants