[Python] API request works in browser, but, doesn't work in Postman or Python requests module

Discussão em 'Python' iniciado por Stack, Fevereiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to request this API: https://iso19139echnap.geocat.live/geonetwork/srv/api/0.1/groups/11864 it works in browser if I enter it as a direct URL, but it doesn't work in Python Request module or in Postman.

    Python code looks like the following:


    import requests

    payload = {
    'username': 'corey',
    'password': 'testing'
    }
    r = requests.get('https://iso19139echnap.geocat.live/geonetwork/srv/api/0.1/groups/11864')

    print(r)
    --------------------------------------------------------
    returns
    <Response [400]>

    Continue reading...

Compartilhe esta Página