Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Calling REST Server Problem

 [1/7] from: tmoeller:fastmail:fm at: 21-Sep-2010 12:54


Hi, i try to call a REST Server running on localhost, port 9999. Doing this with the browser works perfectly, doing this with rebol always results in error 403 forbidden. I know that there is no authentication needed for acessing the REST server. What i know is, that the server only accepts 'application/json' calls. I guess that is the real problem. How can i modify my http GET call to adress this problem? With curl the request should look like this : curl -H Accept:application/json http://localhost:9999/ Can anybody help? Thorsten -- http://www.fastmail.fm - Does exactly what it says on the tin

 [2/7] from: compkarori::gmail at: 21-Sep-2010 23:05


http://rebol.wik.is/Protocols/Http <http://rebol.wik.is/Protocols/Http>or, read url [ header [ content-type: application/json ]] On Tue, Sep 21, 2010 at 10:54 PM, Thorsten Moeller <tmoeller-fastmail.fm>wrote:
> Hi, > i try to call a REST Server running on localhost, port 9999. Doing this
<<quoted lines omitted: 13>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.compkarori.co.nz:8090/ Synapse - the use from anywhere EMR.

 [3/7] from: tmoeller:fastmail:fm at: 21-Sep-2010 13:19


Thanks, now it is working correct. Thorsten On Tue, 21 Sep 2010 23:05 +1200, "Graham Chiu" <compkarori-gmail.com> wrote:
> http://rebol.wik.is/Protocols/Http > <http://rebol.wik.is/Protocols/Http>or,
<<quoted lines omitted: 37>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- http://www.fastmail.fm - mmm... Fastmail...

 [4/7] from: tmoeller:fastmail:fm at: 22-Sep-2010 8:23


Hello Graham, just another question. Is it possible to make a POST or a DELETE this way?? Perhaps you can provide a small example?? I am sorry if this is an really easy thing, but i am not too familiar with http protocol and webprogramming. Regards, Thorsten On Tue, 21 Sep 2010 23:05 +1200, "Graham Chiu" <compkarori-gmail.com> wrote:
> http://rebol.wik.is/Protocols/Http > <http://rebol.wik.is/Protocols/Http>or,
<<quoted lines omitted: 37>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- http://www.fastmail.fm - A no graphics, no pop-ups email service

 [5/7] from: compkarori:gma:il at: 22-Sep-2010 18:45


Hi Thorsten See http://rebol.wik.is/Protocols/Http <http://rebol.wik.is/Protocols/Http>which allows you to use PUT, DELETE etc On Wed, Sep 22, 2010 at 6:23 PM, Thorsten Moeller <tmoeller-fastmail.fm>wrote:
> Hello Graham, > just another question. Is it possible to make a POST or a DELETE this
<<quoted lines omitted: 62>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.compkarori.co.nz:8090/ Synapse - the use from anywhere EMR.

 [6/7] from: tmoeller:fastmail:fm at: 22-Sep-2010 10:13


Hi Graham, i read that and tried various combinations but always ran into errors. It seems to be a problem for me to combine a POST command with the header command used in the example. This is the curl command i tried to build in rebol: curl -H Accept:application/json -X POST http://localhost:9999/node I have to ask another qestion. Is POST and PUT possible as the REST API i call treats them differently?? Kind regards Thorsten On Wed, 22 Sep 2010 18:45 +1200, "Graham Chiu" <compkarori-gmail.com> wrote:
> Hi Thorsten > See http://rebol.wik.is/Protocols/Http
<<quoted lines omitted: 86>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- http://www.fastmail.fm - The way an email service should be

 [7/7] from: compkarori:gma:il at: 22-Sep-2010 20:25


Hi Thorsten Don't use the header word with read/custom and my modified protocol Try: read/custom URL compose [ POST (payload) [ content-type: "application/json" ]] guessing .... read/custom URL [ DELETE "" [ content-type: "application/json" ]] On Wed, Sep 22, 2010 at 8:13 PM, Thorsten Moeller <tmoeller-fastmail.fm>wrote:
> Hi Graham, > i read that and tried various combinations but always ran into errors.
<<quoted lines omitted: 117>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.compkarori.co.nz:8090/ Synapse - the use from anywhere EMR.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted