'Set or replace all fields. The given fields must be in a
list or set where each item is RequestField or string
Arguments:
fields -- A series of fields in RequestField or string format.'

def set_fields(self, fields):

    self.del_fields()
    for field in fields:
        if isinstance(field, RequestField):
            self.add_field(field['name'])
        else:
            self.add_field(field)
