Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: REST Api

  1. #1

    Question REST Api

    Hi,

    Quote Originally Posted by ErosOlmi View Post
    TCP/UDP module works on the transport layer (layer 4) of the OSI Model: https://en.wikipedia.org/wiki/OSI_model
    Ok.

    Quote Originally Posted by ErosOlmi View Post
    If you tell me what you are trying to do, maybe I get help on that.
    Sure,

    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

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10
    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
    OK perfect.
    I've already used thinBasic at work for some WS (Web Services) integration.

    thinBasic module to use is "MSXML2"
    Start from the few examples in C:\thinBasic\SampleScripts\MSXML2\ directory
    In particular "HTTPS_Rest_Api.tbasic" example will show how to connect both sync of async to a bank account to get movements
    Documentation and examples of the bank api is at https://www.platfr.io/#/docs/api

    Let me know.

    Maybe better to start a new thread not to mix tcp and WS
    I will split this thread.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Hi,

    Quote Originally Posted by ErosOlmi View Post
    Let me know.
    It seems to me to be the answer, let me have some time to try it.

    Quote Originally Posted by ErosOlmi View Post
    Maybe better to start a new thread not to mix tcp and WS
    I will split this thread.
    seen, ok.

  4. #4
    The Windows web server market is minuscule to the real world based on Linux, Apache and Nginx.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10
    Quote Originally Posted by John Spikowski View Post
    The Windows web server market is minuscule to the real world based on Linux, Apache and Nginx.
    What's the value of this statement?

    DirectuX asked about "consuming" a WS and not "creating" a WS.
    Who cares about what OS is the WS located or created if you just need to consume its data?

    Please John.



    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    According to W3Techs, Linux has a 37% share and Windows a 32% share. I believe the word 'minuscule' was misused.

    Given that TB and PB are Windows apps, one bloviated opinion that might be true is: Among servers hosting Windows Web Applications, Linux is nearly irrelevant!

  7. #7
    Hi,

    Quote Originally Posted by DirectuX View Post
    let me have some time to try it.
    ErosOlmi, I'm trying, and now facing an error and a question:
    Error code: 262
    Error description: Invalid delimiter
    
    when using these functions :
    https://www.thinbasic.com/public/pro...est_status.htm
    and
    https://www.thinbasic.com/public/pro...nseheaders.htm

    • Here, theses functions doesn't even highlight within thinAir. Is it the same for everyone ?
    • 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]])

  8. #8
    Quote Originally Posted by DirectuX View Post
    Hi,

    ErosOlmi, I'm trying, and now facing an error and a question:
    Update: one must not put parenthesis at the end of these two functions unlike it is said in the documentation.

    Still, the status returned is 0 and the header empty as in the HTTPS rest api example.

  9. #9
    Hi,

    Quote Originally Posted by DirectuX View Post
    Still, the status returned is 0 and the header empty as in the HTTPS rest api example.
    On the good way, able now to successful login.

    Found that console_read() keeps the ending enter key in the string.

    remove$(console_read(),ANY $CRLF)
    
    removes it.

    Quote Originally Posted by DirectuX View Post
    Still, the status returned is 0 and the header empty
    built url was false because of this.

  10. #10
    Sorry Eros!

    I missed the point of this thread reading it too quickly.

    I use libcurl for my web service needs.
    Last edited by John Spikowski; 27-10-2018 at 19:01.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

Page 1 of 2 12 LastLast

Posting Permissions

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