Help: Need to CFHTTP this cURL

I have never had the opportunity to use cURL before. But, now my manager wants to integrate a form submission to our third party vendor, Pivotal Tracker.

The cURL I'm referring to is here: https://www.pivotaltracker.com/help/api?version=v3#add_story


curl -H "X-TrackerToken: TOKEN" -X POST -H "Content-type: application/xml" \
-d "<story><story_type>feature</story_type><name>Fire torpedoes</name><requested_by>James Kirk</requested_by></story>" \
http://www.pivotaltracker.com/services/v3/projects/PROJECT_ID/stories

I have the TOKEN and the PROJECT_ID. I just don't know how to form the call with CFHTTP.

Any help is much appreciated.

Have an iPhone? Wish you had an Android? Now you can have both!!

Check out this sweet hack of the iPhone running Android!

HELP: CFC+jquery+JSON

Ok, I've been at this for a couple of hours now. I thought I was on the right track, but it looks like I'm still a bit lost :(

I have a modal login form using jquery and colorbox plugin.

Here is a snippet of my jquery ajax call:


$j.ajax({
url: 'cfc/security.cfc?method=login',
data: datastring,
dataType: 'json',
success: function(data) {
    var response = eval(data);
    console.log(response.MESSAGE);
$j('.ajaxMsg').css({"display":"block"}).html(data);
$j.fn.colorbox.resize();
}
});

When calling this CFC from a URL using the correct parameters, I get this:
{"MESSAGE":"Verified! Logging in...","FNAME":"John","LNAME":"Smith","VALID":true}
This is exactly what I want.

However, when running the ajax call above I get:


<wddxPacket version='1.0'><header/><data><string>{"MESSAGE":"Verified! Logging in....","FNAME":"John","LNAME":"Smith","VALID":true}</string></data></wddxPacket>


And this is screwing me up.

Here is my CFC snippet:


<CFFUNCTION name="login" access="remote" returntype="string" output="false">
<cfargument name="username" type="string" required="Yes">
<cfargument name="password" type="string" required="Yes">
<cfargument name="stayLogged" type="string" required="no" default="no">
    
<CFSET myReturn = {}>
.... sql statements ...
if valid
<cfset myReturn.valid = "true">
<cfset myReturn.fname = #getLogin.fname#>
<cfset myReturn.lname = #getLogin.lname#>
<cfset myReturn.message = "Verified! Logging in....">

if invalid
<cfset myReturn.valid = "false">
<cfset myReturn.fname = "">
<cfset myReturn.lname = "">
<cfset myReturn.message = "Unverified! Please try signing in again.">

<cfset myReturn = serializeJSON(myReturn)>
    
<cfreturn myReturn>
</cffunction>

Ok...what am I doing wrong? :(

Blackberry Storm/iPhone/iTouch ColdFusion 9 wall paper

I wanted a reminder of why how I pay my rent, own a cellphone and can make a living.

320x480 (native Blackberry Storm resolution)

Best web page footer...ever!

This was found by my co-worker. I had to pass it on. Can be seen at www.newtoyork.com

Why does IE suck so #$(*# much!? Great error message!



Now if only I can find line #131,265,925 I'd be able to fix it.

I don't have 131k lines of code on this page! How do you diagnose this? None of the available tools out there work well for IE.

Gawd...IE is going to drive me to give up web programming and become a used car salesman.

::: hair pulling :::

Humor: OMG hilarious

Don't know about the AC Transit fight?

Simply Put....

It's a slow day in a little east Texas town. The sun is beating down, and the streets are deserted. Times are tough, everybody is in debt, and everybody lives on credit.

On this particular day a rich tourist from back east is driving through town. He stops at the motel and lays a $100 bill on the desk saying he wants to inspect the rooms upstairs in order to pick one to spend the night.

As soon as the man walks upstairs, the owner grabs the bill and runs next door to pay his debt to the butcher.

The butcher takes the $100 and runs down the street to retire his debt to the pig farmer.

The pig farmer takes the $100 and heads off to pay his bill at the supplier of feed and fuel.

The guy at the Farmer's Co-op takes the $100 and runs to pay his debt to the local prostitute, who has also been facing hard times and has had to offer her "services" on credit.

The hooker rushes to the hotel and pays off her room bill with the hotel owner.

The hotel proprietor then places the $100 back on the counter so the rich traveler will not suspect anything.

At that moment the traveler comes down the stairs, picks up the $100 bill, states that the rooms are not satisfactory, pockets the money, and leaves town.

No one produced anything. No one earned anything.

However, the whole town is now out of debt and now looks to the future with a lot more optimism.

And that, ladies and gentlemen, is how the United States Government is conducting business today.

Adobe Flex 4 for Coldfusion programmers -- all day training -- Nov. 20 -- San Francisco -- FREE!!

I'm not sure if everyone is aware of the subject of this posting, but if you're not, please visit this url for more information: http://ria.meetup.com/12/calendar/11859336/

If you're in the bay area and want to get your feet wet with Flex this is the place to be.

Hope to see you there!

If Google released SkyNet

Happy Friday everyone!!!

This is HILARIOUS!!!

If Google released SkyNet

More Entries

Calendar

NAVIGATION

Recent Entries

Recent Comments

RSS

Search

Subscribe

Tags