Quantcast
Channel: Adobe Community : All Content - ColdFusion
Viewing all articles
Browse latest Browse all 5979

Does cfhttp include cfhttpparam elements for delete method requests?

$
0
0

I'm using the Canvas LMS API to attempt to delete user enrollments (see https://canvas.instructure.com/doc/api/enrollments.html#method.enrollm ents_api.destroy).

 

Here's my CF code:

<cfhttp url="#uri#" result="result" method="delete"><cfhttpparam type="header" name="Authorization" value="Bearer #access_token#" /><cfhttpparam type="formfield" name="task" value="delete" /></cfhttp>

 

It appears as though the task form field is not making it through, as the server instead concludes the course enrollment (presumably the API default--I've contact the vendor to verify).

 

However, the following cURL request is successful:

curl <same uri as above> -H 'Authorization: Bearer <same access token as above' -X DELETE -F 'task=delete'

 

I'm hoping that a second pair of eyes will spot an error in my cfhttp request, but I'm guessing that ColdFusion does not include the formfield data if the method is set to delete? (The cfhttpparam docs do state "The formField type attribute is only meaningful with the cfhttp tag POST and GET methods".) In which case, any way around this issue?


Viewing all articles
Browse latest Browse all 5979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>