Git Product home page Git Product logo

Comments (5)

whyour avatar whyour commented on June 1, 2024 1

https://github.com/whyour/qinglong/blob/develop/sample/notify.js 不知道你的场景是怎样的,可以试试

from qinglong.

whyour avatar whyour commented on June 1, 2024 1

https://github.com/whyour/qinglong/blob/develop/sample/notify.js 不知道你的场景是怎样的,可以试试

OK,大佬,试了一下JD订阅和福利库,内容都正常了,无论是form类型还是json形式请求都可以了。

以下是我的config填写,给后面使用的朋友们一个参考: ## 14. 自定义推送 export WEBHOOK_URL="API URL" export WEBHOOK_HEADERS="" export WEBHOOK_BODY='title:$title text:$content' export WEBHOOK_METHOD="POST" export WEBHOOK_CONTENT_TYPE="application/json"

注意无论是multipart/form-data还是application/json Body内容多个字段,均要用换行符换行,字符串转义的\n是不可以的,会被程序再次转义不可用,要真正的换行。如我上面那样。

变量中的换行可以直接换行,或者使用 $'\n' 拼接两行字符串,比如

export WEBHOOK_BODY="title:$title"$'\n'"text:$content"

from qinglong.

xylplm avatar xylplm commented on June 1, 2024

https://github.com/whyour/qinglong/blob/develop/sample/notify.js 不知道你的场景是怎样的,可以试试

OK,大佬,试了一下JD订阅和福利库,内容都正常了,无论是form类型还是json形式请求都可以了。

以下是我的config填写,给后面使用的朋友们一个参考:
## 14. 自定义推送 export WEBHOOK_URL="API URL" export WEBHOOK_HEADERS="" export WEBHOOK_BODY='title:$title text:$content' export WEBHOOK_METHOD="POST" export WEBHOOK_CONTENT_TYPE="application/json"

注意无论是multipart/form-data还是application/json Body内容多个字段,均要用换行符换行,字符串转义的\n是不可以的,会被程序再次转义不可用,要真正的换行。如我上面那样。

from qinglong.

xylplm avatar xylplm commented on June 1, 2024

https://github.com/whyour/qinglong/blob/develop/sample/notify.js 不知道你的场景是怎样的,可以试试

OK,大佬,试了一下JD订阅和福利库,内容都正常了,无论是form类型还是json形式请求都可以了。
以下是我的config填写,给后面使用的朋友们一个参考: ## 14. 自定义推送 export WEBHOOK_URL="API URL" export WEBHOOK_HEADERS="" export WEBHOOK_BODY='title:$title text:$content' export WEBHOOK_METHOD="POST" export WEBHOOK_CONTENT_TYPE="application/json"
注意无论是multipart/form-data还是application/json Body内容多个字段,均要用换行符换行,字符串转义的\n是不可以的,会被程序再次转义不可用,要真正的换行。如我上面那样。

变量中的换行可以直接换行,或者使用 $'\n' 拼接两行字符串,比如

export WEBHOOK_BODY="title:$title"$'\n'"text:$content"

嗯嗯,谢谢大佬。坐等下次发版

from qinglong.

whyour avatar whyour commented on June 1, 2024

2.17.3 已修复

from qinglong.

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.