GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
tutorial
>
PAPOOSE_ACTION_HANDLER
+
Point of view
All features
ANY
HTTP_CONNECTION
All features
class PAPOOSE_ACTION_HANDLER
Summary
top
Direct parents
Inherit list:
HTTP_METHOD_HANDLER
Class invariant
top
action
/= Void
response_header /= Void
response_body /= Void
Overview
top
Creation features
{
PAPOOSE_CONNECTION
}
make
(a_method:
STRING
, a_action:
PROCEDURE
[
TUPLE
], a_log:
PROCEDURE
[
TUPLE 1
[
ABSTRACT_STRING
]])
Features
{
HTTP_CONNECTION
}
method
:
STRING
the request method (GET, POST, etc.)
expect_body
:
BOOLEAN
True if the request must have a body.
prepare_answer
Prepare the answer of the request
add_header
(header:
STRING
)
A request
a_header
is added
add_body
(body:
STRING
)
A request
a_body
is added.
prepare_ok
:
BOOLEAN
True if
prepare_answer
has been completed correctly
answer
(out_stream:
OUTPUT_STREAM
)
Send the request answer to the
a_out_stream
expect
(events:
EVENTS_SET
)
is_ready
(events:
EVENTS_SET
):
BOOLEAN
Current
ca be used to manage a request.
{}
make
(a_method:
STRING
, a_action:
PROCEDURE
[
TUPLE
], a_log:
PROCEDURE
[
TUPLE 1
[
ABSTRACT_STRING
]])
action
:
PROCEDURE
[
TUPLE
]
log
:
PROCEDURE
[
TUPLE 1
[
ABSTRACT_STRING
]]
Implementation
{
HTTP_CONNECTION
}
code
:
INTEGER_32
the HTTP answer code
begin_answer
Launched before the answer preparation
done
:
BOOLEAN
True when the answer has been send
{}
uri
:
STRING
the source URI
version
:
STRING
the http version (1.0, 1.1, etc.)
response_header
:
FAST_ARRAY
[
STRING
]
Every headers of the request
response_body
:
STRING
The complete body of the request
default_body
A defaut answer's body
set_content_length
Set the lenght of the answer's body
reason
:
STRING
A text representation of the answer
code
newline
(a_out_stream:
OUTPUT_STREAM
)
output CRLF
method
:
STRING
writable attribute
{
HTTP_CONNECTION
}
top
the request method (GET, POST, etc.)
expect_body
:
BOOLEAN
is False
constant attribute
{
HTTP_CONNECTION
}
top
True if the request must have a body.
prepare_answer
effective procedure
{
HTTP_CONNECTION
}
top
Prepare the answer of the request
require
not done
add_header
(header:
STRING
)
effective procedure
{
HTTP_CONNECTION
}
top
A request
a_header
is added
add_body
(body:
STRING
)
effective procedure
{
HTTP_CONNECTION
}
top
A request
a_body
is added.
require
expect_body
prepare_ok
:
BOOLEAN
is True
constant attribute
{
HTTP_CONNECTION
}
top
True if
prepare_answer
has been completed correctly
answer
(out_stream:
OUTPUT_STREAM
)
effective procedure
{
HTTP_CONNECTION
}
top
Send the request answer to the
a_out_stream
require
not done
prepare_ok
expect
(events:
EVENTS_SET
)
effective procedure
{
HTTP_CONNECTION
}
top
is_ready
(events:
EVENTS_SET
):
BOOLEAN
effective function
{
HTTP_CONNECTION
}
top
Current
ca be used to manage a request.
make
(a_method:
STRING
, a_action:
PROCEDURE
[
TUPLE
], a_log:
PROCEDURE
[
TUPLE 1
[
ABSTRACT_STRING
]])
effective procedure
{}
top
require
a_method /= Void
a_action /= Void
ensure
method
= a_method
action
= a_action
log
= a_log
action
:
PROCEDURE
[
TUPLE
]
writable attribute
{}
top
log
:
PROCEDURE
[
TUPLE 1
[
ABSTRACT_STRING
]]
writable attribute
{}
top
code
:
INTEGER_32
writable attribute
{
HTTP_CONNECTION
}
top
the HTTP answer code
begin_answer
effective procedure
{
HTTP_CONNECTION
}
top
Launched before the answer preparation
done
:
BOOLEAN
writable attribute
{
HTTP_CONNECTION
}
top
True when the answer has been send
uri
:
STRING
writable attribute
{}
top
the source URI
version
:
STRING
writable attribute
{}
top
the http version (1.0, 1.1, etc.)
response_header
:
FAST_ARRAY
[
STRING
]
writable attribute
{}
top
Every headers of the request
response_body
:
STRING
writable attribute
{}
top
The complete body of the request
default_body
effective procedure
{}
top
A defaut answer's body
set_content_length
effective procedure
{}
top
Set the lenght of the answer's body
reason
:
STRING
effective function
{}
top
A text representation of the answer
code
newline
(a_out_stream:
OUTPUT_STREAM
)
effective procedure
{}
top
output CRLF