I开发者_如何学Go've to call API's from a given url in my code. I try to call url using curl. now I want to use APi's provided by this url in my code.
A web service API typically just communicates over the HTTP protocol. You send some specific requests and receive answers in a certain format, the same thing your browser does with websites. cURL is a great tool to do so.
The specifics will really depend on the API in question, you should study whatever documentation they provide for it.
If you are working with APIS that are based on xml and support the soap protocol a better idea will be just to use soap then curl (less code needed)
精彩评论