File tree 2 files changed +30
-1
lines changed
2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " pagelet" ,
3
- "version" : " 0.9.2 " ,
3
+ "version" : " 0.9.3 " ,
4
4
"description" : " pagelet" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var EventEmitter = require ( 'events' ) . EventEmitter ;
4
+
5
+ //
6
+ // Request stub
7
+ //
8
+ function Request ( url , method ) {
9
+ this . headers = { } ;
10
+ this . url = url || '' ;
11
+ this . uri = require ( 'url' ) . parse ( this . url , true ) ;
12
+ this . query = this . uri . query || { } ;
13
+ this . method = method || 'GET' ;
14
+ }
15
+
16
+ require ( 'util' ) . inherits ( Request , EventEmitter ) ;
17
+
18
+ //
19
+ // Response stub
20
+ //
21
+ function Response ( ) {
22
+ this . setHeader = this . write = this . end = this . once = function noop ( ) { } ;
23
+ }
24
+
25
+ //
26
+ // Expose the helpers.
27
+ //
28
+ exports . Request = Request ;
29
+ exports . Response = Response ;
You can’t perform that action at this time.
0 commit comments