Results 1 to 7 of 7

Thread: Another RESTtest.vw problem

  1. #1
    Join Date
    Mar 2009
    Location
    Edmonton Canada
    Posts
    824

    Default Another RESTtest.vw problem

    Again, thanks to Mike Peat for providing RESTTest.vw in his blog posting "Consuming RESTful Services in Dataflex"
    I have turned it in to a class that is used in my RESTTestClass.vw and more importantly my Windows modules that call REST Webservices.
    From it I can call jsonplaceholder, the Dataflex WebOrder REST Webservice, two WebServices I have written, both GET and POST.
    All is good.
    Except .....

    Both RESTTest.vw and RESTTestClass.vw have the following issue.
    They get an http response status 400 return from calling a ColdFusion REST webservice
    The browser calls it ok

    This works in the browser:
    http://ws.clientsite.com/restapi/ind.../event/4614304

    This produces an http response status 400
    Host: ws.clientsite.net
    Port: 80
    Path: restapi/index.cfm/import2000/event/4614304
    Verb: GET

    Any ideas what my problem might be?
    Thanks
    RChi

  2. #2
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    1,992

    Default Re: Another RESTtest.vw problem

    Archie

    I can't get that link to work:

    This site can’t be reached

    ws.clientsite.com’s server IP address could not be found

    Mike

  3. #3
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    1,992

    Default Re: Another RESTtest.vw problem

    That said, an HTTP response of 400 indicates that at least it was reached for you, even if it didn't work.

    Mike

  4. #4
    Join Date
    Mar 2009
    Location
    Edmonton Canada
    Posts
    824

    Default Re: Another RESTtest.vw problem

    Quote Originally Posted by Mike Peat View Post
    Archie

    I can't get that link to work:

    This site can’t be reached

    ws.clientsite.com’s server IP address could not be found

    Mike
    Hi Mike
    I did not want to post the client's url on a public forum so I used "clientsite" instead.
    I sent you a message from this forum that had the correct url.
    Did you get the message?
    Thanks
    Archie

  5. #5
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    1,992

    Default Re: Another RESTtest.vw problem

    I did thanks, Archie - and it works... I'll get back to you.

    Mike

  6. #6
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    1,992

    Default Re: Another RESTtest.vw problem

    OK Archie

    (With thanks to Harm for spotting the problem.)

    Change RESTTest.vw at around line 40 (in Procedure Reset):

    Code:
                Set psAcceptTypes   to "*"
    To:

    Code:
                Set psAcceptTypes   to "*/*"
    Which should do the trick.

    Mike

  7. #7
    Join Date
    Mar 2009
    Location
    Edmonton Canada
    Posts
    824

    Default Re: Another RESTtest.vw problem

    Yes that certainly does fix the problem
    Thank you Mike !!!
    Thank you Harm !!!
    Archie

Tags for this Thread

Posting Permissions

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