Skip to content
  • ntome's avatar
    browser: better guess POST method with empty data in build_request · 04681719
    ntome authored and hydrargyrum's avatar hydrargyrum committed
    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
    04681719