Skip to content
This repository has been archived by the owner. 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 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

@marco89nish marco89nish commented Aug 2, 2014

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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.