Re: TSNet updated to include PUT and PATCH

2018-05-05 Thread Dan Brown via use-livecode
I wish we had gRPC for communicating with firebase / cloud Firestone, would
be so much easier

On Sat, 5 May 2018, 22:20 ivara via use-livecode, <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> Glad i finally found some information about PUT in a html method (not the
> put something into another object).
>
> The current challange:
>
> -> Working with a solution that requires me to write a desktop / app that
> communicates with REST API.
> -> POST is the starting point, and the values sent to the REST API is
> accepted in this case the order in a purchase is created.
> -> The second part that is required is to issue a PUT statement with the
> total amount for the order ( a numeric value).
> -> POST and GET is a no brainer in livecode, but how the h#¤%% do I send a
> PUT the the REST API to update the processing ID and total amount for the
> order?
>
> Tested in Postman and this code works like a charm: (notibly the auth key
> is
> scrambled, but it is working)
>
> PUT /payments/1140066900/link HTTP/1.1
> Host: api.quickpay.net
> accept-version: v10
> Content-Type: multipart/form-data; boundary=MyTest001
> Authorization: Basic OjM4MT...
> Cache-Control: no-cache
> Postman-Token: 95b8e245-0097-4559f-b936-d48e7a8927a5
>
> --MyTest001
> Content-Disposition: form-data; name="amount"
>
> 650
> --MyTest001--
>
>
> Tried all kinds of methods to get PUT working like e.g. the POST statement
> with very similar syntax that works from Livecode, but no way.
>
> This is the error:
>
> {
> "message": "Validation error",
> "errors": {
> "target_operation": [
> "does not have a valid value"
> ]
> },
> "error_code": null
> }
>
> Basically it replies like this because it thinks a POST is being submitted.
> Actually this is the copy paste from PostMan, but same detail in debug in
> livecode after execute of the statment. And yes; the reason is that a "PUT"
> statement is submitted to the REST API from livecode using "POST tBody
> (body
> element) to url "https://;
>
>
> Don't care what method I have to use to solve this, I just need something
> that works. Please help, been searching and debugging for two days now..
>
> cheers!
>
> Ivar
>
>
>
>
>
>
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: TSNet updated to include PUT and PATCH

2018-05-05 Thread ivara via use-livecode
Hello,

Glad i finally found some information about PUT in a html method (not the
put something into another object). 

The current challange:

-> Working with a solution that requires me to write a desktop / app that
communicates with REST API. 
-> POST is the starting point, and the values sent to the REST API is
accepted in this case the order in a purchase is created. 
-> The second part that is required is to issue a PUT statement with the
total amount for the order ( a numeric value). 
-> POST and GET is a no brainer in livecode, but how the h#¤%% do I send a
PUT the the REST API to update the processing ID and total amount for the
order?

Tested in Postman and this code works like a charm: (notibly the auth key is
scrambled, but it is working)

PUT /payments/1140066900/link HTTP/1.1
Host: api.quickpay.net
accept-version: v10
Content-Type: multipart/form-data; boundary=MyTest001
Authorization: Basic OjM4MT...
Cache-Control: no-cache
Postman-Token: 95b8e245-0097-4559f-b936-d48e7a8927a5

--MyTest001
Content-Disposition: form-data; name="amount"

650
--MyTest001--


Tried all kinds of methods to get PUT working like e.g. the POST statement
with very similar syntax that works from Livecode, but no way. 

This is the error:

{
"message": "Validation error",
"errors": {
"target_operation": [
"does not have a valid value"
]
},
"error_code": null
}

Basically it replies like this because it thinks a POST is being submitted.
Actually this is the copy paste from PostMan, but same detail in debug in
livecode after execute of the statment. And yes; the reason is that a "PUT"
statement is submitted to the REST API from livecode using "POST tBody (body
element) to url "https://;


Don't care what method I have to use to solve this, I just need something
that works. Please help, been searching and debugging for two days now.. 

cheers!

Ivar









--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: TSNet updated to include PUT and PATCH

2018-03-14 Thread Charles Warwick via use-livecode
Hi Todd,

You can use the tsNetCustom* functions to issue any HTTP(S) request type you 
require (including PATCH and PUT).  The tsNetUpload* functions are also 
effectively just a PUT request when using the HTTP(S) protocols.

Let me know if you need any more info.

Cheers,

Charles

> On 14 Mar 2018, at 6:49 pm, Todd Fabacher via use-livecode 
>  wrote:
> 
> Hello Charles and LC community,
> 
> As we start to use more JSON databases and REST APIs, we are going to need
> to get HTTPS PATCH. This is a commonly used function used by many REST
> services.
> 
> We are currently doing Google Firebase for LiveCode and they make extensive
> use of PATCH. We can get by with just POST, but we would prefer if we could
> get PUT and PATCH on mobile.
> 
> Is there any plan at all on the roadmap??
> 
> --Todd
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


TSNet updated to include PUT and PATCH

2018-03-14 Thread Todd Fabacher via use-livecode
Hello Charles and LC community,

As we start to use more JSON databases and REST APIs, we are going to need
to get HTTPS PATCH. This is a commonly used function used by many REST
services.

We are currently doing Google Firebase for LiveCode and they make extensive
use of PATCH. We can get by with just POST, but we would prefer if we could
get PUT and PATCH on mobile.

Is there any plan at all on the roadmap??

--Todd
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode