Skip to content

Instantly share code, notes, and snippets.

@Purvanshsingh
Created April 22, 2021 14:07
Show Gist options
  • Save Purvanshsingh/054e003f05dea1c2f46564eb5a7fb711 to your computer and use it in GitHub Desktop.
Save Purvanshsingh/054e003f05dea1c2f46564eb5a7fb711 to your computer and use it in GitHub Desktop.
I am trying to query Movie API using hydra-python-agent.
from hydra_agent.agent import Agent
agent = Agent("http://localhost:8080/api")
resource = {
"@type": "Movie",
"movie_name": "Godfather",
"movie_director": "Francis Ford Coppola"
}
agent.post("http://localhost:8080/api/Movie",resource)
print("Movie added.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment