OwO-Network / DeepLX

Powerful Free DeepL API, No Token Required
https://ssa.sx/deeplx
MIT License
6.64k stars 533 forks source link

curl test #1

Closed gedw99 closed 1 year ago

gedw99 commented 1 year ago

Cool !

Maybe add a curl test to the README Or a makefile


WEB_URL=http://0.0.0.0:1199

@echo ""
@echo "GET"
curl -H "Content-Type: application/json" -X GET $(WEB_URL)/

@echo ""
@echo "POST"
curl -d '{"text":"hello", "source_lang":"EN", "target_lang":"DE"}' -H "Content-Type: application/json" -X POST $(WEB_URL)/translate
gedw99 commented 1 year ago

not sure why response has % at the end ?

` {"code":200,"data":"hallo","id":157799001}%

missuo commented 1 year ago

@gedw99 Because I didn't include line breaks, the % appears in the Terminal that comes with Mac, not Linux.