fortran-lang / http-client

http-client offers a user-friendly, high-level API to make HTTP requests in Fortran.
https://http-client.fortran-lang.org/
MIT License
60 stars 8 forks source link

What HTTP request methods to support? #18

Closed milancurcic closed 1 year ago

milancurcic commented 1 year ago

Currently http-client exposes 6 request methods:

https://github.com/fortran-lang/http-client/blob/c1efef853eb1a8ce1ecd1ba8f60f9cc67899bc4c/src/http/http_request.f90#L8-L14

However 3 other methods are defined by HTTP: CONNECT, OPTIONS, and TRACE.

Should they be made available?

We can take one of two paths here:

  1. Simply implement them if libcurl supports them; or
  2. Don't implement until we have a use-case or a feature request.
rajkumardongre commented 1 year ago

While it is true that the CONNECT, OPTIONS, and TRACE HTTP methods are not as commonly used as other methods like GET, POST, PUT, and DELETE, i think we can consider them for the sake of API completeness. If these methods are supported by libcurl, it may be worth considering implementing them in our project.

milancurcic commented 1 year ago

Let's evaluate the addition of the remaining methods if a need comes up (i.e. if a user opens an issue).