You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to POST a form on a website where all the checkboxes have identical names, I need to pass a list with duplicate names. But, the duplicates are silently dropped.
The culprit seems to be .x[names(dots)] <- dots in modify_list().
which would have the advantage of replacing entire homonym groups, and would pass the current tests for modify_list().
It wouldn't help with the headaches in #95and # 88 though (I am not sure about the # 88).
For a more systematic solution, how about an additional argument replace = TRUE, or a dedicated req_body_form_modify() so that we can decide whether the body gets replaced instead of combined?
req_body_*: replaces entire body, avoiding the modify_list() call
req_body_*_modify: combines lists
The text was updated successfully, but these errors were encountered:
jchrom
added a commit
to jchrom/httr2
that referenced
this issue
Apr 22, 2022
Now uses strategy suggested by @jchrom, where we operate on "homonym groups". This makes it possible to use duplicate names in url parameters and form/multipart bodies.
Fixes#97. Fixes#107.
In order to POST a form on a website where all the checkboxes have identical names, I need to pass a list with duplicate names. But, the duplicates are silently dropped.
The culprit seems to be
.x[names(dots)] <- dots
in modify_list().It could be replaced with something like
which would have the advantage of replacing entire homonym groups, and would pass the current tests for
modify_list()
.It wouldn't help with the headaches in #95
and # 88though (I am not sure about the # 88).For a more systematic solution, how about an additional argument
replace = TRUE
, or a dedicatedreq_body_form_modify()
so that we can decide whether the body gets replaced instead of combined?req_body_*
: replaces entire body, avoiding themodify_list()
callreq_body_*_modify
: combines listsThe text was updated successfully, but these errors were encountered: