[Bash] Send post request with payload to server by using curl

#!/bin/bash

# url will be a param been passed in
url=$1

curl -X POST http://localhost:3000/endpoint -d "{\"payload\":\"$url\"}" -H "content-type: application/json"

 

posted @ 2023-12-13 02:27  Zhentiw  阅读(4)  评论(0编辑  收藏  举报