Coder Social home page Coder Social logo

Comments (2)

Finb avatar Finb commented on August 24, 2024

URL只要遵守通用规范即可 , 很容易调试

需要注意的点

  1. 特殊字符需要URL编码,不编码有可能导致URL结构出错或匹配错了路由
//例如
https://api.day.app/key/title/{推送内容}
//如果{推送内容}是
"a/b/c/"
//则最后的URL是
https://api.day.app/key/title/a/b/c/
//将找不到对应的路由,后端程序将返回404
  1. 按定义好的路由路径格式访问

URL出现问题 显示其出问题的部分不好实现

  1. URL如果拼错了,请求就到不了服务器

  2. 要么到了服务器,但是路由匹配错了,这时也需要你自己根据结果去判断是不是出问题了
    你本来想匹配 A 路由,但是写错了匹配到了B路由, 这时服务器不能确定你是搞错了,只会当成你成功请求了B。这是一个正常的成功的请求,不存在错误

  3. 参数错了,在返回的json response 中有具体的错误原因

  4. 访问了不存在的路径,根据http 状态码即可知道

from bark.

uetcis avatar uetcis commented on August 24, 2024

是这样的,我在尝试用 IFTTT 的 Webhook 来推送,这样的话涉及到对请求的编码问题,所以会比较难调试。。。

from bark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.