Files
coder/scripts/apidocgen/markdown-template/code_sh.dot
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
577 B
Plaintext
Raw Normal View History

{{ const rawBodyFile = data.operation['x-apidocgen'] && data.operation['x-apidocgen'].rawBodyFile; }}# Example request using curl
curl -X {{=data.methodUpper}} http://coder-server:8080{{=data.url}}{{=data.requiredQueryString}}{{?data.allHeaders.length}} \{{?}}
{{~data.allHeaders :p:index}}{{
if (p.name == "Content-Type" && p.exampleValues.object == "application/x-www-form-urlencoded") {
continue;
}
}} -H '{{=p.name}}: {{=p.exampleValues.object}}'{{?index < data.allHeaders.length-1 || rawBodyFile}} \
{{?}}{{~}}{{?rawBodyFile}} --data-binary '@{{=rawBodyFile}}'{{?}}