Open
Conversation
archiewood
reviewed
Sep 24, 2025
| } | ||
| case HttpMethod::POST: | ||
| case HttpMethod::PUT: | ||
| throw IOException("POST or PUT not implemented"); |
Member
There was a problem hiding this comment.
presume still have to implement these?
GET=read_gsheet()
POST=COPY TO
archiewood
reviewed
Sep 24, 2025
| SSL_library_init(); | ||
| SSL_load_error_strings(); | ||
| OpenSSL_add_all_algorithms(); | ||
| #endif |
Member
There was a problem hiding this comment.
Do we need SSL at all now if we are using the duckdb util instead?
archiewood
reviewed
Sep 24, 2025
| #include "duckdb/main/database.hpp" | ||
| #include <chrono> | ||
| #include <openssl/ssl.h> | ||
| #include <openssl/err.h> |
14 tasks
AminKhorramii
pushed a commit
to AminKhorramii/duckdb_gsheets
that referenced
this pull request
Feb 14, 2026
Based on PR evidence-dev#90 by @carlopi with critical fixes and improvements: Changes: - Replace OpenSSL HTTP with DuckDB's HTTPUtil (WASM compatible) - Implement POST/PUT support using HTTPUtil - Guard all OpenSSL includes/linking with #ifndef EMSCRIPTEN - Guard file I/O and interactive auth flows for WASM - Add clear error messages for unsupported features in browser - Conditional OpenSSL linking in CMakeLists.txt WASM Support: - ✅ GET requests (read from Google Sheets) - ✅ POST/PUT requests (write to Google Sheets) - ✅ access_token auth provider (OAuth Bearer tokens) - ❌ oauth provider (requires interactive terminal) - ❌ key_file provider (requires file system access) CORS: Works with OAuth Bearer tokens, no proxy needed Build artifacts: - Native: build/release/extension/gsheets/gsheets.duckdb_extension (6.0MB) - WASM: build/wasm_eh/extension/gsheets/gsheets.duckdb_extension.wasm (325KB) Tested: Native build passes, WASM build passes Ready for: Browser testing in shell.duckdb.org Closes evidence-dev#35 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
This is basically implementing #35.
There are few logical part of this PRs:
This should be a NOP, does changes a bunch of signature and insulate the code a bit less, but should be safe to do
httpfsduckdb/duckdb#17464 for initial PR to duckdb/duckdb)This is the most fragile part, that might be worth some extra tests, since
duckdb_gsheetsmight be using some Openssl [implicit] parameters. I think I covered basics, but extra pair of eyes to review changes inperform_https_requestOR changes in behaviour are welcome.There are two big advantage in using HTTPUtils: better integration with the rest of the system, so that for example logging would come out of the box (I think
CALL enable_logging(level='trace', storage='stdout');should show all API calls after this PR, and second that one reuse existing infrastructure, so that improvements are shared everywhere. As part of this second bit, HTTPUtil has a Wasm implementation, so this makes possible to use ghsees from a browser.1 and 3 should be OK, 2 is where there are risks and rewards, so needs to be checked with care.
All put together you should then be able to do, within duckdb-wasm currently deployed at https://shell.duckdb.org (once you disable signed extension access, that do require to serve it yourself):
I have not looked at automatic secret (that currently succeed at SQL level but has no token), so maybe it would be handy to add a block like:
near https://github.com/evidence-dev/duckdb_gsheets/blob/main/src/gsheets_auth.cpp#L171