什么是与 API 相关的回调 URL? [英] What is a callback URL in relation to an API?

查看:62
本文介绍了什么是与 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.

这篇关于什么是与 API 相关的回调 URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆