[En-Nut-Discussion] REST server

markus.forrer at gmx.ch markus.forrer at gmx.ch
Thu Sep 26 15:15:29 CEST 2013


I'd like to use the MicroHTTP library to realize a REST server since REST is based on HTTP. Instead of MediaType I'll use a specific request handler to create and send the REST answer. I only need the MicroHTTP library for parsing the HTTP headers.

The client sends the following data (splittet in two separate TCP packets, recorded by Wireshark). Between the two TCP packet it's required, that the MicroHTTP sends 'HTTP/1.1 100 Continue'. Is it possible to realize this functionality with MicroHTTP?

Thanks a lot.

Best regards
Markus
 

TCP packet 1 from client:

POST /restdata/item1 HTTP/1.1
Accept: text/xml
Host: ???
Content-Length: ???
Expect: 100-continue


Response from server:

HTTP/1.1 100 Continue
 

TCP packet 2 from client:

<Root>
<DataField1>xyz</DataField1>
<DataField2>123</DataField2>
<DataField3>abc</DataField3>
</Root>

 


More information about the En-Nut-Discussion mailing list