Camel.Medium¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.Medium(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- add_header(name, value)¶
-
Adds a header to a
Camel.Medium
.
- dup_headers()¶
- Returns:
the array of headers, which must be freed with
Camel.NameValueArray.free
().- Return type:
Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also
Camel.Medium.get_headers
().New in version 3.24.
- get_content()¶
- Returns:
a
Camel.DataWrapper
containing self's content. Can returnNone
.- Return type:
Gets a data wrapper that represents the content of the medium, without its headers.
- get_header(name)¶
- Parameters:
name (
str
) – the name of the header- Returns:
the value of the named header, or
None
- Return type:
Gets the value of the named header in the medium, or
None
if it is unset. The caller should not modify or free the data.If the header occurs more than once, only retrieve the first instance of the header. For multi-occuring headers, use
Camel.Medium.dup_headers
() orCamel.Medium.get_headers
().
- get_headers()¶
- Returns:
the array of headers, owned by self.
- Return type:
Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also
Camel.Medium.dup_headers
().New in version 3.24.
- remove_header(name)¶
- Parameters:
name (
str
) – the name of the header
Removes the named header from the medium. All occurances of the header are removed.
- set_content(content)¶
- Parameters:
content (
Camel.DataWrapper
orNone
) – aCamel.DataWrapper
object
Sets the content of self to be content.
- set_header(name, value)¶
-
Sets the value of a header. Any other occurances of the header will be removed. Setting a
None
header can be used to remove the header also.
- do_add_header(name, value) virtual¶
-
Adds a header to a
Camel.Medium
.
- do_dup_headers() virtual¶
- Returns:
the array of headers, which must be freed with
Camel.NameValueArray.free
().- Return type:
Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also
Camel.Medium.get_headers
().New in version 3.24.
- do_get_content() virtual¶
- Returns:
a
Camel.DataWrapper
containing medium's content. Can returnNone
.- Return type:
Gets a data wrapper that represents the content of the medium, without its headers.
- do_get_header(name) virtual¶
- Parameters:
name (
str
) – the name of the header- Returns:
the value of the named header, or
None
- Return type:
Gets the value of the named header in the medium, or
None
if it is unset. The caller should not modify or free the data.If the header occurs more than once, only retrieve the first instance of the header. For multi-occuring headers, use
Camel.Medium.dup_headers
() orCamel.Medium.get_headers
().
- do_get_headers() virtual¶
- Returns:
the array of headers, owned by medium.
- Return type:
Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also
Camel.Medium.dup_headers
().New in version 3.24.
- do_remove_header(name) virtual¶
- Parameters:
name (
str
) – the name of the header
Removes the named header from the medium. All occurances of the header are removed.
- do_set_content(content) virtual¶
- Parameters:
content (
Camel.DataWrapper
orNone
) – aCamel.DataWrapper
object
Sets the content of medium to be content.
Property Details¶
- Camel.Medium.props.content¶
- Name:
content
- Type:
- Default Value:
- Flags: