Skip to content
Prev 361402 / 398506 Next

httr package syntax (PUT)

On Wed, Jun 1, 2016 at 7:16 PM, Jared Rodecker <jared.rodecker at gmail.com> wrote:
If you use verbose() you should be able to see what the problem is -
httr does the json encoding for you. You want:

params <- list(email_address = "some_user at domain.com", status_if_new =
"subscribed")
PUT("https://us10.api.mailchimp.com/3.0/lists/list_id_XXXXX/members/MEMBER_HASH_#######",
   config = auth,
   body = params,
   encode = "json"
)

Hadley