@rip-lang/api 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/api.rip +3 -3
  2. package/package.json +1 -1
package/api.rip CHANGED
@@ -90,18 +90,18 @@ createContext = (req, params = {}) ->
90
90
 
91
91
  ctx =
92
92
  json: (data, status = 200, headers = {}) ->
93
- for k, v of headers then out.set(k, v)
94
93
  out.set 'Content-Type', 'application/json'
94
+ for k, v of headers then out.set(k, v)
95
95
  new Response JSON.stringify(data), { status, headers: out }
96
96
 
97
97
  text: (str, status = 200, headers = {}) ->
98
- for k, v of headers then out.set(k, v)
99
98
  out.set 'Content-Type', 'text/plain; charset=UTF-8'
99
+ for k, v of headers then out.set(k, v)
100
100
  new Response str, { status, headers: out }
101
101
 
102
102
  html: (str, status = 200, headers = {}) ->
103
- for k, v of headers then out.set(k, v)
104
103
  out.set 'Content-Type', 'text/html; charset=UTF-8'
104
+ for k, v of headers then out.set(k, v)
105
105
  new Response str, { status, headers: out }
106
106
 
107
107
  redirect: (location, status = 302) ->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/api",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Pure Rip API framework — elegant, fast, zero dependencies",
5
5
  "type": "module",
6
6
  "main": "api.rip",