question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to pass payload via action() method, but some HTTP routes require a body

See original GitHub issue

ArangoDB version: 3.3.12 pyArango version: 1.3.1 (via pip)

See https://stackoverflow.com/questions/51362259/rename-collection-with-pyarango

To rename a collection, it is necessary to pass a JSON body {"name":"newname"} in a PUT request to /_api/collection/<collectionHandle>/rename. The .action() method only supports passing on URL path params however.

The HTTP docs also describe that there would be a path parameter ?collection-name=newname but it is not support anymore (I tried with curl but got errors back about name being empty as if no parameter for name or collection-name was passed).

It would be nice if the action method and possibly others too would support passing a body.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dilipvamsicommented, Jun 3, 2019

Okay, I will look into it.

0reactions
dilipvamsicommented, Jun 10, 2019

Hi @tariqdaouda @Simran-B , Please check the pull request(https://github.com/ArangoDB-Community/pyArango/pull/155) which has the implementation for action in Connection and DB, which can be later used for creating functions which represent the rest apis provided by ArangoDB.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP GET with request body
Yes, you can send a request body with GET but it should not have any meaning. If you give it meaning by parsing...
Read more >
Sending form data - Learn web development | MDN
Because the body is empty, if a form is sent using this method the data sent to the server is appended to the...
Read more >
Best practices for REST API design
Learn how to design REST APIs to be easy to understand for anyone, future-proof, secure, and fast since they serve data to clients...
Read more >
Accepting Raw Request Body Content in ASP.NET Core API ...
There's no easy way to simply retrieve raw data to a parameter in an API method, so a few extra steps are provided...
Read more >
Working with routes for HTTP APIs
For example, you can create an API with only a $default route and integrate it on the ANY method with the https://petstore-demo-endpoint.execute-api.com HTTP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found