Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11311

Bad syntax in example

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      https://docs.mongodb.com/stitch/reference/partner-services/http/index.html#example-secret-query-parameter

      The copyable code example is:

      curl -H "Content-Type: application/json" \
       -X POST "https://stitch.mongodb.com/api/client/v1.0/app/hmac-test-vxdts/svc/http1/incomingWebhook/593ebc9d57e0fa4051f173e6?secret=12345"
       -d { "message": "HELLO" }
      

      There is a missing line continuation character at the end of the second line and the contents of the -d parameter must be surrounded in quotes. The correct code should look like this:

      curl -H "Content-Type: application/json" \
       -X POST "https://stitch.mongodb.com/api/client/v1.0/app/hmac-test-vxdts/svc/http1/incomingWebhook/593ebc9d57e0fa4051f173e6?secret=12345" \
       -d '{ "message": "HELLO" }'
      

      As well this example shouldn't be copyable since an end-user cannot execute it. The hmac-test-vxdts Stitch application does not exist.

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 4 weeks, 2 days ago