Re: RESTful PUT error

2017-12-29 Thread Andrew Bell via use-livecode
Thanks for the feedback on proper headers! I looked again at the PipeDrive API [https://developers.pipedrive.com/docs/api/v1/#!/Persons/put_persons_id] in more detail and noticed that the Phone I was trying to change was actually looking for an array rather than a number or string so I th

Re: RESTful PUT error

2017-12-15 Thread Sean Cole (Pi) via use-livecode
Actually, your json needs to also include the name as a requirement, looking at the post format for 'Persons'. So it would be something like: Put "{ 'name': 'John Smith' " & lf & " 'phone': '555-555-' }" into tJSON replace "'" with quote in tJSON Put "https://api.pipedrive.com/v1/persons/1?ap

Re: RESTful PUT error

2017-12-15 Thread Sean Cole (Pi) via use-livecode
Hi Andrew, I've been doing a whole heap of this just recently so have gained more experience in this than I would have hoped for :( In other words, I had hoped it would have been easier. especially working with oAuth procedures which ended up as a rolling nightmare for me these last few weeks. He

Re: RESTful PUT error

2017-12-15 Thread Alex Tweedly via use-livecode
On 15/12/2017 17:19, Andrew Bell via use-livecode wrote: They also tested updating the phone value themselves via API, and were successful. I'd ask them for the sample code they used to do this update, and see if that gives us a clue. -- Alex. ___

Re: RESTful PUT error

2017-12-15 Thread Andrew Bell via use-livecode
I tried suggestions from several users (on and off the list), but nothing has worked for me. After contacting Pipedrive tech support, I got the typical IT response of "it works for us" as they blamed LiveCode. They suggested that somehow using regex would fix the issue, but I'm not sure how

Re: RESTful PUT error

2017-11-27 Thread Alex Tweedly via use-livecode
"programming pattern" I (sometimes) do something like this - so that each and every line of additional output looks and feels the same, e.g. put "something" & CR after tVariable put "something else" & CR after tVariable etc. i.e. every line finishes with   "  & CR after tVariable " so that ca

Re: RESTful PUT error

2017-11-27 Thread Bob Sneidar via use-livecode
Why do you set the httpHeaders to empty just before you set them to something? Bob S > On Nov 27, 2017, at 04:27 , Todd Fabacher via use-livecode > wrote: > > *--Build the REST API Header* > > *set* the httpHeaders to empty > > *put* "Accept: application/json" & CR after tHeaders > > *pu

Re: RESTful PUT error

2017-11-27 Thread Todd Fabacher via use-livecode
What are you setting your headers to?? Are you sending JSON or posting a form?? This is to send a form and get back JSON. You may also want XML or TEXT FYI, most RestAPI use POST. *--Build the REST API Header* *set* the httpHeaders to empty *put* "Accept: application/json" & CR after tHeader

Re: RESTful PUT error

2017-11-26 Thread Pi Digital via use-livecode
I’ve been working on a library connecting LiveCode with MS Dynamics365 CRM via some APIs custom made for us in c#. LiveCode makes its calls to the API by REST. At first I was using Put url to send some simple calls but started getting errors in some. I was advised to switch over to using Post in

Re: RESTful PUT error

2017-11-26 Thread Roger Eller via use-livecode
If I remember correctly, PUT was never implemented in LibUrl. I have only needed GET and POST in my rather limited uses. ~Roger On Nov 26, 2017 10:37 AM, "Andrew Bell via use-livecode" < use-livecode@lists.runrev.com> wrote: I'm working on connecting to a 3rd-party API (Pipedrive) to a LiveCod

RESTful PUT error

2017-11-26 Thread Andrew Bell via use-livecode
I'm working on connecting to a 3rd-party API (Pipedrive) to a LiveCode app I've done and seem to have a problem; any assistance would be appreciated. Dummy (sandbox) account information has been included with my code sample. I've never used RESTful before, but the API seems pretty well do