Skip to content
This repository was archived by the owner on Jan 18, 2019. It is now read-only.

Newlines in JSON payload can cause failure #33

Closed
OddBloke opened this issue Aug 1, 2014 · 1 comment
Closed

Newlines in JSON payload can cause failure #33

OddBloke opened this issue Aug 1, 2014 · 1 comment
Milestone

Comments

@OddBloke
Copy link
Contributor

OddBloke commented Aug 1, 2014

Putting the below JSON in post.json and submitting it via curl -H "Content-Type: application/json" -X POST https://live.stellar.org:9002 -d - < post.json gets a response containing "Unable to parse request". If I remove all of the new lines and indentation, it works.

{
    "method": "submit",
    "params": [
        {
            "secret": "<secret>",
            "tx_json": {
                "TransactionType": "TrustSet",
                "Account": "gK7NVjpKeR54Y8dEBqPTye9MW4C69cvWCK",
                "LimitAmount": {
                    "value": "20",
                    "currency": "NZD",
                    "issuer": "gs9HHU3pmkKBuvykhNm6xiK1JKrput9i3K"
                }
            }
        }
    ]
}
@marco89nish marco89nish self-assigned this Aug 1, 2014
@marco89nish
Copy link
Contributor

I suggest using curl -H "Content-Type: application/json" -X POST https://live.stellar.org:9002 -d @post.json to avoid issues. I'll look into possible problem with parsing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants