类型API的AWS API Gateway可选请求内容类型

时间:2018-06-20 03:31:33

标签: swagger aws-api-gateway swagger-2.0 api-gateway

我需要在AWS API Gateway上有一个模拟API,该API始终应以内容类型和正文中的静态内容的200个响应代码router.popToRoot()进行响应。

问题在于,当我在请求中提供import matplotlib.animation as animation import matplotlib.pyplot as plt class Example: def __init__(self): self.fig = plt.figure() def update(self, num): print("This is getting called") def animate(self): ani = animation.FuncAnimation(self.fig, update, interval=100) def main(): obj = Example() obj.animate() if __name__ == "__main__": main() 时,当前配置只能按预期工作。 无论请求的内容类型如何,我都需要API响应。

我也在使用swagger 2.0。这是我的端点配置:

text/html

0 个答案:

没有答案
相关问题