Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: REST Api

  1. #11
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Dear DirectuX,

    thanks for reporting misleading help on some functions and () at the end.
    I will fix parsing and help. And yes, some methods are not colored in thinAir, I will try to fix this.

    Regarding your try ... did you check "HTTPS_Rest_Api.tbasic" example?
    It uses .getAllResponseHeaders and .getResponseHeader... methods.
    Was that example working for you?

    Let me know.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #12
    Hi,

    Quote Originally Posted by ErosOlmi View Post
    misleading help on some functions
    That is sadly too common to many language, thinBasic manages it rather well. In my opinion php.net 's manual is a good example to follow, regarding documentation; especially "User Contributed Notes" on each page.

    Quote Originally Posted by ErosOlmi View Post
    And yes, some methods are not colored in thinAir, I will try to fix this.
    Note:I've just discovered that there is an autocomplete function in thinAir, it is not enabled by default. Didn't find/looked for the dictionary to add keywords.

    Quote Originally Posted by ErosOlmi View Post
    Regarding your try ... did you check "HTTPS_Rest_Api.tbasic" example?
    It uses .getAllResponseHeaders and .getResponseHeader... methods.
    Was that example working for you?
    Precisely, I started here. Then I coded from empty script with the help of the online manual. In the example, status is 0 too. But as it is a web-online 2017 example, I didn't expect it to still work. Yet, it is by means of it I found the parenthesis are unwanted.

    Quote Originally Posted by DirectuX View Post
    I'm studying the practicability of talking with an OrientDB Server instance using the OrientDB RESTful HTTP protocol : http://orientdb.com/docs/last/OrientDB-REST.html
    Practicability is ok. I proceed further.

    Thanks again

  3. #13
    Quote Originally Posted by DirectuX View Post
    And, can I assume that after initializing an <ServerXMLHTTPRequest> object, I can set request headers before opening a request ? that is to say: use <ServerXMLHTTPRequest>.SetRequestHeader(strHeaderName, strValue) before <ServerXMLHTTPRequest>.Open(bstrMethod, bstrUrl [, bAsync [, bstrUser, bstrPassword]])
    One more thing,
    can you answer this ?

  4. #14
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    ServerXMLHTTPRequest object takes advance of the Microsoft IServerXMLHTTPRequest2 object
    Get more info at thinBasic help file https://www.thinbasic.com/public/pro...tml?msxml2.htm
    or Microsoft docs at https://docs.microsoft.com/en-us/pre...54586(v=vs.85)

    .setRequestHeader should be executed after .Open and before .Send
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #15
    Quote Originally Posted by ErosOlmi View Post
    I've already seen these pages but this hasn't answer my question regarding thinbasic's module: it may have behave as an object where one can set properties first then call method.

    Quote Originally Posted by ErosOlmi View Post
    .setRequestHeader should be executed after .Open and before .Send
    Ok, that is clear. Thanks ErosOlmi.

Page 2 of 2 FirstFirst 12

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •