heavytiger
Chevereto Noob
I tried GET method first, and it's working pretty well. But when I switch to POST method, I am getting below error:
This is GET method:
This is POST method.
Code:
{
"status_code": 400,
"error": {
"message": "Invalid API v1 key.",
"code": 100,
"context": "Exception"
},
"status_txt": "Bad Request"
}
This is GET method:
Code:
curl --location --request GET 'https://example.com/api/1/upload/?key=bPl95An642nMwzdA5hxOqKzk9kRuHVeDT&source=https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1297937920,2807167311&fm=26&gp=0.jpg' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "bPl95An642nMwzdA5hxOqKzk9kRuHVeDT",
"source": "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1297937920,2807167311&fm=26&gp=0.jpg",
"format": "json"
}'
This is POST method.
Code:
curl --location --request POST 'https://example.com/api/1/upload/' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "bPl95An642nMwzdA5hxOqKzk9kRuHVeDT",
"source": "https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1297937920,2807167311&fm=26&gp=0.jpg",
"format": "json"
}'