Skip to content

Data in cURL examples is not quoted properly #58

Closed
@mindscratch

Description

@mindscratch

The cURL examples genreated when doing a POST or PUT don't properly quote the data associated with the -d flag.

For example, the rad-example app has the following cURL example for creating an order:

curl "http://rad-example.herokuapp.com/orders" -d "{"order":{"name":"Order 1","paid":true,"email":"[email protected]"}}" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Host: example.org" -H "Cookie: "

source: http://rad-example.herokuapp.com/docs/orders/creating_an_order

If you copy/paste that example it'll fail because the data uses all double quotes. Instead the outer quotes should be single quotes such as:

-d '{"order":{"name":"Order 1","paid":true,"email":"[email protected]"}}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions