GithubHelp home page GithubHelp logo

关于Post请求 about bark-server HOT 5 CLOSED

finb avatar finb commented on May 26, 2024
关于Post请求

from bark-server.

Comments (5)

mritd avatar mritd commented on May 26, 2024 1

@Finb 我要不要彻底重写一下?
@lovelykd 这个锅是 @Finb

from bark-server.

Finb avatar Finb commented on May 26, 2024

title/body 除了可以放在 path 和 query 里
也能放在 POST Data 里的

curl -d 'title=123&body=hello world'  -X POST https://api.day.app/:key/

from bark-server.

lovelykd avatar lovelykd commented on May 26, 2024

了解,谢谢你们的回复

from bark-server.

mritd avatar mritd commented on May 26, 2024

其实我一直觉得应该换个正经的 web 框架,轻量级的 router 啥的 😅

from bark-server.

DarrenSong avatar DarrenSong commented on May 26, 2024

目前的Get和Post请求都是将title/body/category等内容放在URL里面,我感觉对于Post请求,将它们封装为json payload更为合适

curl -d '{"title":"123", "body": "hello world"}' -H "Content-Type: application/json" -X POST https://api.day.app/:key/

-X 后面的内容不需要加引号吗?

from bark-server.

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.