feat: RequestOptions for individual requests#476
Merged
Conversation
ifsheldon
pushed a commit
to ifsheldon/async-openai-wasm
that referenced
this pull request
Nov 28, 2025
* feat: RequestOptions * cargo fmt * cargo clippy fix * make RequestOptions methods as pub(crate) * remove query parameters from individual methods * update tests and examples to use RequestOptionsBuilder trait * cargo fmt * remove query params from all other methods * update examples to use query chain method * cargo clippy fix * cargo fmt * handle query properly * fix bring-your-own-type tests * query parameters for all APIs * updated README * fix example: * cargo fmt * namespaced query param types * fix example * update * fix link * only initialize request options vector when needed (cherry picked from commit 8b33483)
kraemahz
pushed a commit
to subseq-io/async-openai
that referenced
this pull request
Dec 12, 2025
* feat: RequestOptions * cargo fmt * cargo clippy fix * make RequestOptions methods as pub(crate) * remove query parameters from individual methods * update tests and examples to use RequestOptionsBuilder trait * cargo fmt * remove query params from all other methods * update examples to use query chain method * cargo clippy fix * cargo fmt * handle query properly * fix bring-your-own-type tests * query parameters for all APIs * updated README * fix example: * cargo fmt * namespaced query param types * fix example * update * fix link * only initialize request options vector when needed
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.
Option to allow per request configurable headers and query parameters.
This enables chaining of methods to optionally provide custom query or headers, for example (only for demonstration):
or
or