rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.71k stars 285 forks source link

Update curl examples to include --compressed flag #975

Closed rdlrt closed 4 weeks ago

rdlrt commented 1 year ago

A very simplistic optimisation to include --compressed argument to generated curl examples. While this may be blocked on some configurations, it should work for most. Especially when working with large results, this can heavily save data size being transferred over network.

mrin9 commented 4 weeks ago

The curl syntax is provided solely to represent the equivalent API call. The actual API request is made using JavaScript's Fetch API, not curl. Since the purpose of the curl syntax is to illustrate the API call, including --compressed flag in syntax may cause confusion, as it might imply that special handling is required to manage compressed responses