Skip to content

mkimmet/Simple-JSON-Poster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-JSON-Poster

This is a simple windows command line tool that posts JSON to a URL. It is very basic and allows you to post an array of elements, or 2 elements individually (see example usage below). The code might be a little ugly, but does the job.

It uses the CommandLineParser nuget package to manage the arguments.

Example Usage

For example if you want to post into Slack:

JSONPoster.exe -u "https://hooks.slack.com/services/ASDFASDF/ASDFASDF/ASDFASDF" -n "username" -c "The Robot" -a "text" -b "I am a robot, here's a link to google <http://google.com>."

Example of Posting with an piped (|) delimited ElementArray (where x is the name array and y is the value array, making sure both are equal size and correctly ordered):

JSONPoster.exe -u "https://mysiteexample100.com/myAPI" -t ElementArray -x "FirstName|LastName|Age" -y "Henry|Jones|60"

Known Issues / Bugs

  • The escaping of double quotes and backslashes should work now, however, single quotes in messages might cause issues.
  • Code is a little ugly

About

This is a simple windows command line tool that posts JSON to a URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages