[DOCS-11311] Bad syntax in example Created: 01/Feb/18  Updated: 29/Oct/23  Resolved: 03/Apr/18

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: James Kovacs Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 5 years, 45 weeks, 1 day ago

 Description   

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.



 Comments   
Comment by Nicholas Larew [ 03/Apr/18 ]

https://github.com/10gen/baas-docs/pull/118

Comment by Eric Daniels (Inactive) [ 01/Feb/18 ]

james.kovacs, can you file this against DOCS?

Generated at Thu Feb 08 08:02:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.