Skip to content

Cannot pass 'body' or 'headers' key as a POST parameter #64

Open
@huynq2007

Description

@huynq2007

The below code is from base.py

def post(self, url, body=None, headers=None, **params):
    headers = headers or {}
    url += self.urlencode(params)
    if 'content-type' not in headers:
        headers['content-type'] = 'application/json'
    return self.request('POST', url, body, headers)

the params dictionary cannot contain body key or a headers key. As the below example, I want to pass body='body of message' as a param to the Api

some_object = {'foo': 'bar'}
client.rooms.message.post(body=some_object, tags="social devcon", body="body of message")

as the body is referenced as body of POST method. Is there any way to pass body as a parameter

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions