new Service(opts, req, res)
- Source:
Handles invoking the git-*-pack binaries
Parameters:
| Name | Type | Description |
|---|---|---|
opts |
Object | options to bootstrap the service object |
req |
http.IncomingMessage | http request object |
res |
http.ServerResponse | http response |
Extends
Members
(readonly) connection :net.Socket
- Source:
- Inherited From:
- See:
Reference to the underlying socket for the request connection.
Type:
- net.Socket
(readonly) method :String
- Source:
- Inherited From:
- See:
Request method of the incoming request.
Type:
- String
Example
'GET', 'DELETE'
(readonly) readable :Boolean
- Source:
- Inherited From:
Is this stream readable.
Type:
- Boolean
req :http.IncomingMessage
- Source:
- Inherited From:
- See:
A IncomingMessage created by http.Server or http.ClientRequest usually passed as the first parameter to the 'request' and 'response' events. Implements Readable Stream interface but may not be a decendant thereof.
Type:
- http.IncomingMessage
res :http.ServerResponse
- Source:
- Inherited From:
- See:
Created http.server. Passed as the second parameter to the 'request' event. The response implements Writable Stream interface but isn't a descendent thereof.
Type:
- http.ServerResponse
(readonly) socket :net.Socket
- Source:
- Inherited From:
- See:
net.Socket object associated with the connection.
Type:
- net.Socket
statusCode :Number
- Source:
- Inherited From:
- Default Value:
- 200
- See:
The HTTP status code. Generally assigned before sending headers for a response to a client.
Type:
- Number
Example
request.statusCode = 404;
statusMessage :String
- Source:
- Inherited From:
- Default Value:
- undefined
- See:
Controls the status message sent to the client as long as an explicit call to response.writeHead() isn't made If ignored or the value is undefined, the default message corresponding to the status code will be used.
Type:
- String
Example
request.statusMessage = 'Document Not found';
(readonly) trailers :Object
- Source:
- Inherited From:
- See:
Request/response trailer headers. Just like headers except these are only written
after the initial response to the client.
This object is only populated at the 'end' event and only work if a 'transfer-encoding: chunked'
header is sent in the initial response.
Type:
- Object
(readonly) upgrade :Boolean
- Source:
- Inherited From:
- See:
Whether or not the client connection has been upgraded
Type:
- Boolean
(readonly) url :String
- Source:
- Inherited From:
Request URL string.
Type:
- String
Examples
A request made as:
GET /info?check=none HTTP/1.1
Will return the string
'/info?check=none'
Methods
(static) accept()
- Source:
accepts request to access resource
(static) reject(code, msg)
- Source:
reject request in flight
Parameters:
| Name | Type | Description |
|---|---|---|
code |
Number | http response code |
msg |
String | message that should be displayed on teh client |