0

I have these curl commands

1.

curl -XPUT "http://192.168.1.1:8080/locate" -d'
{
    "crap": {
        "crazy": 1
    },
    "asap": {
        "peg": {
            "properties": {
                "url": {
                    "type": "string",
                    "index": "no"
                }
            }
        }
    }
}'

2.

curl -XPOST "http://192.168.1.1:8080/locate" -d'
{
    "url": "https://cdn.happyworld.com/lmfao"
}'

How do i write each of them in one line curl command so that i can easily place each on one line in a bash script?

If one line is not possible, then how can i format them so that bash will understand as one command each?

Thanks!!!

uberrebu
  • 503
  • 6
  • 17
  • 36

1 Answers1

1

Great thing is i just went aggressive mode and solved it myself

1.

curl -XPUT "http://192.168.1.1:8080/locate" -d'{"crap": {"crazy": 1},"asap": {"peg": {"properties": {"url": {"type": "string","index": "no"}}}}}'

2.

curl -XPOST "http://192.168.1.1:8080/locate" -d'{"url":"https://cdn.happyworld.com/lmfao"}'
uberrebu
  • 503
  • 6
  • 17
  • 36