Service
Hierarchy
- HttpDuplex
- Service
Index
Constructors
constructor
Parameters
opts: ServiceOptions
options to bootstrap the service object
req: IncomingMessage
http request object
res: ServerResponse
http response
Returns Service
Properties
commit
cwd
evName
exists
last
logs
repo
req
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.
res
Created http.server. Passed as the second parameter to the ‘request’ event. The response implements Writable Stream interface but isn’t a descendent thereof.
service
status
username
Accessors
complete
Returns boolean
connection
Reference to the underlying socket for the request connection.
Returns Socket
headers
Request/response headers. Key-value pairs of header names and values. Header names are always lower-case.
Returns IncomingHttpHeaders
httpVersion
Requested HTTP Version sent by the client. Usually either ‘1.0’ or ‘1.1’
Returns string
httpVersionMajor
First integer in the httpVersion string
Returns number
httpVersionMinor
Second integer ni the httpVersion string
Returns number
method
Request method of the incoming request.
Returns undefined | string
readable
Is this stream readable.
Returns boolean
socket
net.Socket object associated with the connection.
Returns Socket
statusCode
The HTTP status code. Generally assigned before sending headers for a response to a client.
Returns number
Parameters
val: number
Returns void
statusMessage
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.
Returns string
Parameters
val: string
Returns void
trailers
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.
Returns Dict<string>
url
Request URL string.
Returns undefined | string
writable
Returns boolean
Methods
accept
accepts request to access resource
Returns void
cork
Buffers written data in memory. This data will be flushed when either the uncork or end methods are called.
Returns Service
destroy
Returns void
end
Parameters
optionalreason: any
Returns void
log
Returns void
reject
reject request in flight
Parameters
code: number
http response code
msg: string
message that should be displayed on the client
Returns void
setHeader
Parameters
arg0: string
arg1: string
Returns void
uncork
Flushes all data buffered since cork() was called.
Returns Service
writeHead
Sends a response header to the client request. Must only be called one time and before calling response.end().
Parameters
statusCode: number
3-digit HTTP status code, like 404
statusMessage: string
An optional human readable status message to send with the status code
headers: string[]
An object containing the response headers to send
Returns Service
Handles invoking the git-*-pack binaries