代码之家  ›  专栏  ›  技术社区  ›  Nicote Ool

405 Postman和公共GraphQl API不允许使用的方法

  •  1
  • Nicote Ool  · 技术社区  · 2 年前

    我是GraphQl的新手,并且我试图使用Postman Web和公共GraphQlneneneba API来获得响应-> 对于API,我使用的正是这个地址:

    https://graphql.org/swapi-graphql?query=query%20%7B%0A%20%20allFilms%20%7B%0A%20%20%20%20films%20%7B%0A%20%20%20%20%20%20title%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D

    所以,在《邮差》中,我只是这样做了:

    enter image description here

    在“授权”选项卡中,我有以下内容:

    enter image description here

    我在这里做错了什么?,是不是少了一些页眉?

    0 回复  |  直到 2 年前
        1
  •  1
  •   Nicote Ool    2 年前

    所以,最后我犯了几个错误。首先,地址是错误的->

    https://swapi-graphql.netlify.app/.netlify/functions/index (就是这个)

    其次,在PostMan中做到这一点的正确方法是->

    enter image description here