0
다음 코드파이썬 POST 요청은 반복적으로
description = fake.catch_phrase()
group_id = ''
invite_only = 1 if fake.boolean(chance_of_getting_true=50) == True else 0
is_public = 1 if fake.boolean(chance_of_getting_true=50) == True else 0
title = fake.company()
payload = {description,
group_id,
invite_only,
is_public,
title}
response = requests.post(createGroup, data=(payload), headers=headers)
나는이
처럼 같은 페이로드를 전송하려고하면 나는 그러나 서버 에SequelizeValidationError: notNull Violation: v_title cannot be null
를 얻을 수와 루프로 POST 요청을하기 위해 노력하고있어
payload = {'description': 'abc',
'group_id': '1',
'invite_only': '1',
'is_public': '1',
'title': 'someTitle'}
완벽하게 정상적으로 작동합니다.
따라서 질문은 게시물 호출에서 임의로 생성 된 데이터를 보낼 수 있습니까? 가능한 경우 어떻게 가능합니까?
고마워요! 이것은 효과가있다. –