Skip to content
Commit 04681719 authored by ntome's avatar ntome 💬 Committed by hydrargyrum
Browse files

browser: better guess POST method with empty data in build_request

Passing data='' or json={} to browser methods like open() or build_request()
used to make a GET, but this is incorrect.

We can simply check the non-None of one of those params.
If a Request parameter is used though, it's more implicit, because we cannot
guess what was the intention, we can't easily distinguish the default value from
an intentionally empty value

    Request().data == []
    Request().json is None
parent e22dd9bf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment