facundobatista / kilink

A next generation pastebin
GNU General Public License v3.0
25 stars 30 forks source link

The "get linkode" via API should be able to just return the content #142

Open facundobatista opened 4 years ago

facundobatista commented 4 years ago

Let's support an optional "raw=True" query parameter in the following endpoints:

/api/1/linkodes/<linkode_id>/<revno>
/api/1/linkodes/<linkode_id>

If raw is present as a query parameter, and set to True, the response will be just the bytes of the linkode, utf-8 encoded. This encoding and the linkode type should be explicited in the Content-Type header of the response.

ldelelis commented 4 years ago

I'll take it, as we talked in the telegram group, to work on it along with someone else