Skip to content

Support sending gzipped request bodies #923

@alahiff

Description

@alahiff

Whenever there is a large amount of content the Python API should gzip the body and include the following header:

"Content-Encoding": "gzip"

This should be done for:

  • Sending large numbers of runs, i.e. "loadSim"
  • Sending scalar or non-scalar metrics
  • Sending events

In the requests post you can just do:

data=gzip.compress(msgpack.packb(data, use_bin_type=True))

or

data=gzip.compress(json.dumps(data).encode("utf-8"))

as appropriate. Obviously don't use json=... any more in requests.post(...), use data=... instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions