garethbjohnson / gutendex

Web API for Project Gutenberg ebook metadata
https://gutendex.com
MIT License
231 stars 46 forks source link

Support POST requests #34

Open fakerybakery opened 11 months ago

fakerybakery commented 11 months ago

Hi, Amazing service! Thank you so much! Might it be possible to allow POST requests as well?

garethbjohnson commented 11 months ago

Hi, I am glad you like it!

Do you mean requests to add new books to the database? If so, then it would be outside of my intended scope for this project, which is to give the Project Gutenberg catalogue, which is already added to the database without POST requests.

fakerybakery commented 11 months ago

Hi, sorry, I meant the HTTP POST method to query books.

garethbjohnson commented 11 months ago

Hi, OK, why would you like to query with POST? Why not GET?

fakerybakery commented 11 months ago

Hi, it's a bit easier to use for search queries

garethbjohnson commented 11 months ago

Hi again, I find that POST requests already work. Did you mean that you would like to use the request body to filter results instead of query parameters?

fakerybakery commented 11 months ago

Yes, that's what I mean. Not sure if it's too difficult to implement, I could try to make a PR

herrAlison commented 10 months ago

I tried everything, but unfortunately without success,

import requests

with requests.session() as session:

url = 'https://register.fdsinstitut.com/ext/index.php'

headers = {} cookies = {} donnees = {}

reponse = session.post(url, headers=headers, cookies=cookies, data=donnees)

print(reponse.text)

garethbjohnson commented 10 months ago

@herrAlison Is this related to Gutendex?