Example #1
0
 def get_header(self, name):
     name = name.lower()
     datatype = get_type(name)
     value = self.soup_message.get_header(name)
     if value is None:
         return datatype.get_default()
     return datatype.decode(value)
Example #2
0
 def set_header(self, name, value):
     datatype = get_type(name)
     value = datatype.encode(value)
     self.soup_message.set_header(name, value)