I use curl in open api call, but I want to know the meaning of the option

Asked 2 years ago, Updated 2 years ago, 111 views

curl "https://openapi.naver.com/v1/papago/n2mt" \
-H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
-H "X-Naver-Client-Id:\
-H "X-Naver-Client-Secret: \
-d "nice to meet you source=ko&target=en&text=" \
-v

Here

-H and
-d
-v

What does each mean?

open-source http

2022-09-22 14:26

1 Answers

What you're wondering is not really about open APIs, but what are these CURL options? And that's all in this document.

-H, --header <header/@file>

Header to include additional HTTP requests when sending them to the server.

The rest is homework!

PS. As you may know, according to the CURL synopsis you posted, you will actually have to put the key/secret value in this way and run it to get what you want.

curl "https://openapi.naver.com/v1/papago/n2mt" \
-H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
-H "X-Naver-Client-Id: Naver Open API Client ID" \
-H "X-Naver-Client-Secret: Naver Open API Secret" \
-d "nice to meet you source=ko&target=en&text=" \
-v


2022-09-22 14:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.