[En-Nut-Discussion] REST server
markus.forrer at gmx.ch
markus.forrer at gmx.ch
Fri Sep 27 13:32:27 CEST 2013
Hi Harald
>> TCP packet 1 from client:
>>
>> POST /restdata/item1 HTTP/1.1
>> Accept: text/xml
>> Host: ???
>> Content-Length: ???
>
>That length is the length of packet 1, I guess.
No, it's the length of the XML content (in packet 2).
>> Expect: 100-continue
>
>There is no content-type header, right?
Yes, there isn't.
> Probably a CGI function must be used to
> handle the POST, but I need a bit more
> time to check the details.
Have you got an example how to use the CGI function to get the hole content (XML data)?
> I do not have any real world experience
> with REST. Would it make sense for me
> to install any simple REST client for testing
> (Linux or Windows)?
No, REST is absolut simple. You don't need anything else. The sample I postet is one complete REST client POST request with XML data in the content. The REST server is a test server written in .net/C#.
The request was sent as a hole packet with .net/C#, but it was automatic splittet in two TCP packets I have to get pieced together.
Thank you very much for your help!
Best regards
Markus
More information about the En-Nut-Discussion
mailing list