Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-carrots-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openfn/language-kobotoolbox': major
---

Update `http.request` option docs to use `data` instead of `body` in requests
Comment thread
josephjclark marked this conversation as resolved.
4 changes: 2 additions & 2 deletions packages/kobotoolbox/src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as util from './util';
* @typedef {Object} HTTPRequestOptions
* @property {object} query - An object of query parameters to be encoded into the URL
* @property {object} headers - An object of all request headers
* @property {object} body - The request body (as JSON)
* @property {object} data - The request body data (as JSON)
* @property {number} maxRedirections - The maximum number of redirects to follow
* @property {string} [parseAs='json'] - The response format to parse (e.g., 'json', 'text', or 'stream')
*/
Expand All @@ -24,7 +24,7 @@ import * as util from './util';
* Make a HTTP request to any KoboToolbox endpoint
* @example <caption>Bulk updating of submissions</caption>
* http.request("PATCH", `assets/${$.form_uid}/data/bulk/`, {
* body: {
* data: {
Comment thread
hunterachieng marked this conversation as resolved.
* submission_ids: [$.data.submission_id],
* data: {
* Transaction_status: "success",
Expand Down