Skip to content

Problem accessing selenzyme using API with python3 requests.post #2

@anasves

Description

@anasves

I have recently tried to access the Selenzyme using the REST API through python3 as following:

# importing the requests library
import requests
import json

# defining the api-endpoint
url = "http://selenzyme.synbiochem.co.uk/REST"

# data to be sent to api
data = {'db':'rhea', 'rxnid':'10040'}

# sending post request and saving response as response object
r = requests.post(url = url, json =  json.dumps(data))
print(r)
# extracting response text
result = r.text
print(result)

The result I am getting are the following:

<Response [405]>

{"message": "The method is not allowed for the requested URL."}

Could you, please, tell me if I could I access the Selenzyme results using python requests.post method or do I have to apply different approach?

Thank you very much in advance for your response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions