AnsweredAssumed Answered

BaseElements Plug-in BE_HTTP_POST...  URL encoded or not?

Question asked by HazMatt on Dec 17, 2015
Latest reply on Aug 31, 2016 by sibrcode



I'm using the BaseElements plug-in to do some Amazon S3 integration; uploading and deleting files.  For each endpoint, I am passing our own home-grown API credentials as well as the AWS credentials and bucket name.


'upload' endpoint variables:

  • u (API username)
  • p (API password)
  • response_type
  • aws_key
  • aws_secret
  • bucket
  • path
  • upload[]


'delete' endpoint variables:

  • u
  • p
  • response_type
  • aws_key
  • aws_secret
  • bucket
  • path_list[]


BaseElements appears to automatically encode the upload URL (my web guy says it's required to do a POST with attachments) but when I try the same with delete, it does not encode the URL parameters, so I have to do GetAsURLEncoded() on each variable before sending off the delete request.  Conversely, if I do GetAsURLEncoded() on my upload URL parameters, it fails in a similar fashion.


So, this begs the question…  does BE_HTTP_POST automatically encode URLs when sending attachments and not in other cases?


Link to BE_HTTP_POST function description:

Functions · GoyaPtyLtd/BaseElements-Plugin Wiki · GitHub