Dashboard - Delete returns 400 error - You must specify a content-type. Aborting request

320 views
Skip to first unread message

Richard Poole

unread,
Nov 19, 2013, 6:24:02 PM11/19/13
to taffy...@googlegroups.com
Hi Adam,

Might be user error but when I attempt a Delete Request I get a 400 error. I've checked the request headers and it looks like the Content-Type is null which would explain the error but I'm not sure if this is due to something I'm doing a wrong?

Cheers,

Richard

Adam Tuttle

unread,
Jan 29, 2014, 11:24:51 AM1/29/14
to taffy...@googlegroups.com
Hi Richard,

Sorry that this thread fell through the cracks. Did you ever get it resolved?

Adam


--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Richard Poole

unread,
Jan 30, 2014, 2:17:07 AM1/30/14
to taffy...@googlegroups.com
Hi Adam,

I just added the line in bold to dash.js and that did the trick. In normal usage I didn't need to do anything, it just seemed like an issue in the dash.

var body = (verb === 'GET' || verb === 'DELETE') ? params(qParams(resource)) : resource.find('.reqBody textarea').val();
var headers = {
Accept: resource.find('.reqFormat option:checked').val(),
Authorization:make_base_auth(username,password),
"Content-Type":"application/json"
};

Loving Taffy btw, we're hoping to launch our API in about a month, it's been a mammoth job but should make a big difference to our users.

Cheers,

Richard



--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/KdMcnPPeVeQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.

Adam Tuttle

unread,
Jan 30, 2014, 10:44:52 AM1/30/14
to taffy...@googlegroups.com
Good to know. The final solution will need to be generalized a little bit, but I think we can figure something out.

Adam

prashant roy

unread,
Oct 10, 2016, 4:52:36 PM10/10/16
to Taffy Users
how can i find out what's the request type, i mean if its json or xml?

is there any method?
after request, i need to know request type in post method?

Adam Tuttle

unread,
Oct 11, 2016, 5:13:37 PM10/11/16
to Taffy Users
Why do you need to know?

Adam

To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ρräshȁnϯ RṏY

unread,
Oct 12, 2016, 12:55:00 AM10/12/16
to taffy...@googlegroups.com
Adam

i need to store raw xml and json in my database. 

I am using your "GETASjson" and "GETASxml" , but to call these functions i need to know what kind of request it is. 

so i need to know request type (xml? json?)

we figured out, we are using  MIMEEXT.

please see below code

                       <cfif arguments.MIMEEXT eq "json"> 
<cfset local.rawOutput = representationOf(output).GETASjson()>
<cfelseif arguments.MIMEEXT eq "xml">
<cfset local.rawOutput = representationOf(output).GETASxml()>
</cfif>

<cfset UpdateRawResponse(local.rawOutput,local.MainRequestId )>
To unsubscribe from this group and all its topics, send an email to taffy-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages