什么是与 API 相关的回调 URL?

什么是与 API 相关的回调 URL?

问题描述:

我一直在网上搜索,似乎无法理解回调 URL 的想法.就我而言,我有一些必须自己定义的回调 URL.一种流行的是默认回调 URL".这究竟是什么?你能用简单的英语举个例子吗?

I've been scouring the net, and can't seem to wrap my head around the idea of a callback URL. In my case I have a few callback URLs that I have to define myself. A popular one is a "default callback URL". What is this exactly? Can you give an example in plain english?

回调 URL 将在完成后由您正在调用的 API 方法调用.所以如果你打电话

A callback URL will be invoked by the API method you're calling after it's done. So if you call

POST /api.example.com/foo?callbackURL=http://my.server.com/bar

然后当 /foo 完成时,它会向 http://my.server.com/bar 发送请求.该请求的内容和方法会有所不同 - 请查看您正在访问的 API 的文档.

Then when /foo is finished, it sends a request to http://my.server.com/bar. The contents and method of that request are going to vary - check the documentation for the API you're accessing.