ColdFusion Cfhttp to Create Google Calendar Event.
₹600-1500 INR
Lezárt
Kiadva ekkor: körülbelül 6 évvel ezelőtt
₹600-1500 INR
Teljesítéskor fizetve
Please dont bid if you can do it by monday.
It is a very easy those who knows about this. just a 5-10 minute work.
My Budget is Rs 300-800.
I have implement most of the API calls using CFHTTP All is working fine.
I am using below code to create google calendar event.
Every parameter passed to it correct (validated). but with cfhttp it is not getting sent. I got error of
Filecontent { "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Missing end time." } ], "code": 400, "message": "Missing end time." } }
<cfset title=eventTitle>
<cfset curlPost = StructNew()>
<cfset curlPost['summary'] = eventTitle>
<cfif eventType EQ 'FIXED-TIME'>
<cfset startTime = Replace(eventStartTime," ","T") & ":00">
<cfset endTime = Replace(eventEndTime," ","T") & ":00">
<cfset eventDate = "">
<cfset allDay = 0>
<cfset curlPost['start']['dateTime'] = startTime>
<cfset curlPost['start']['timeZone'] = [login to view URL]>
<cfset curlPost['end']['dateTime'] = endTime>
<cfset curlPost['end']['timeZone'] = [login to view URL]>
<cfelse>
<cfset startTime = "">
<cfset endTime = "">
<cfset eventDate = eventDate>
<cfset allDay = 1>
<cfset curlPost['start']['date'] = eventDate>
<cfset curlPost['end']['date'] = eventDate>
</cfif>
<cfdump var="#serializeJSON(curlPost)#">
<cfdump var="#curlPost#">
<cfhttp url="[login to view URL]" method="post" result="httpResponse">
<cfhttpparam type="header" name="Content_Type" value="application/json">
<cfhttpparam type="header" name="Authorization" value="Bearer #session.access_token#" />
<cfhttpparam type="body" value="#serializeJSON(curlPost)#">
</cfhttp>
Please help me resolving this issue.
all the parameters are not passed properly and 400 error means... http post url is not correct.... your code seems to be conversion of php code to CF 'curlpost' sounds like php variable...