Sneha
Sneha

Reputation: 45

Can we POST the data present in json format using wget in linux

I want to know is there a possibility to post the data in json format to a dashboard from linux server. My JSON data is in the below format.

{
    "data":"{\"actiontodo\":\"Action to do for test nr: 
     1\",\"critical\":\"LOW\",\"fixstatus\":\"NOTCONCERN\",\"host\":\"MTR_SOME_HOST\",
     \"message\":\"$message\",\"mgsApplication\":\"MTR\",\"sMxtype\":\"PROD\",
     \"scriptname\":\"$scriptname\"}",
    "msg":"NotificationReceiveDTO without dict to send at: 2020-06-07T11:14:09.794 Created at: 2020- 
     06-07T11:14:09.797",
    "msgType":"DATA"
}

Upvotes: 0

Views: 3377

Answers (1)

L McClean
L McClean

Reputation: 350

From the man page for wget it is possible to post data to website, using either the --post-data=string or --post-file=file argument.

Upvotes: 2

Related Questions