Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API with curl #134

Closed
abeq opened this issue Dec 16, 2022 · 5 comments
Closed

REST API with curl #134

abeq opened this issue Dec 16, 2022 · 5 comments

Comments

@abeq
Copy link

abeq commented Dec 16, 2022

Hi, I have tried REST API but error has occurred:

C:\Users\foobar> curl http://127.0.0.1/api/books -X GET
curl: (1) Unsupported HTTP version in response
  • curl 7.83.1 (Windows)
  • curl 7.86.0 (x86_64-w64-mingw32)

Please advise me.

@little-brother
Copy link
Owner

You forgot to specify a port. Your request uses default 80 but sqlite-gui waits on 3000.

@abeq
Copy link
Author

abeq commented Dec 18, 2022

I thought you are right, but I have tried curl http://127.0.0.1:3000/api/books -X GET then return same error.
With Chrome, I got expected return.

@abeq
Copy link
Author

abeq commented Dec 25, 2022

withdrawn

@abeq abeq closed this as completed Dec 25, 2022
@little-brother
Copy link
Owner

little-brother commented Dec 26, 2022

Why? The issue exists. I don't the cause yet. Perhaps some response headers are missing.
Sorry, I don't have a time to investifate and fix it immediately.

little-brother added a commit that referenced this issue Mar 3, 2023
* URI db path support (issue #139)
* Up SQLite to 3.41.0
* Fix issues #128, #130, #131, #134
* Appy PR #132, #136, #137, #138
* Minor changes
@little-brother
Copy link
Owner

It was a bug. I forgot to set a response status.
Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants