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

commcare: documentation issues on request() #903

Closed
josephjclark opened this issue Jan 13, 2025 · 0 comments · Fixed by #916
Closed

commcare: documentation issues on request() #903

josephjclark opened this issue Jan 13, 2025 · 0 comments · Fixed by #916
Assignees

Comments

@josephjclark
Copy link
Collaborator

Image

We've hit some issues on commcare's request docs

  • The options parameter is misleading. The value passed as options will be passed as the URL query. So actually, we should rename this parameter to params (which is consistent with commcare.get). A good description would be An object of query parameters to be encoded into the URL.. We should include an example of a request with a query and show how that maps to the actual URL that will be called (like we do with get)
  • RequestOptions is not a link. Turns out there is no typedef for RequestOptions. But actually there should not be - options should have a type of object, not RequestOptions

There is an argument that options should actually be options, in which case it accepts { headers, query, parseAs ...} options which get fed into common http.

But that's not how the API works right now (I suspect this is a bug) and I don't want to raise a breaking change today)

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

Successfully merging a pull request may close this issue.

2 participants