Repository navigation
feat(http): POST with a JSON body, and paging and cursors in the body - #191
Merged
Merged
Conversation
…heck body paths up front A 301, 302 or 303 after a POST now fails instead of being followed as a GET without its body. A next page on another origin fails rather than receiving json_body. Connection headers go before the JSON body, so a connection's Content-Type is the only one sent. A body path that runs through a non-object in json_body fails before any request. The docs now mark these features as coming in 0.36.0.
Deploying sqlload with
|
| Latest commit: |
d76db2d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dabb863d.sqlload.pages.dev |
| Branch Preview URL: | https://feat-http-post-body.sqlload.pages.dev |
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.
sl.httpjobs can now send a POST with a JSON body, and put offset, page-number or cursor values in that body instead of the query string.api.paginate(...)andapi.fan_out(...)takemethod="POST"andjson_body.sl.offset,sl.page_numberandsl.cursortakelocation="body", withparam(andlimit_param) given as paths such as"$.page.cursor".json_body, and a retry resends the same body. Cursor tokens keep their JSON type.ctx.cursor_valueinjson_body.json_bodynever leaves the connection's origin.json_bodyon a GET, body paging without POST, a bad body path, and a body path that runs through a non-object.Docs: a new "POST with a JSON body" section in
sources/python.mdx, marked as coming in 0.36.0.Tests: 13 new cases in
packages/sqlload/tests/test_http_jobs.py, run against a local stub API. All 59 http job tests pass, andmake checkis clean.Closes CHI-1243