Loading ...
Sorry, an error occurred while loading the content.
 

Re: [rest-discuss] doPost.

Expand Messages
  • Dave Pawson
    ... Which to me doesn t make sense Vincent. However. ... Not get and post? ... OK OK :-) I ll go read. ... The barf is of my own making. Just unsure which
    Message 1 of 9 , Apr 25, 2005
      On Sun, 2005-04-24 at 23:04 +0100, Vincent D Murphy wrote:
      > On Sun, 24 Apr 2005 19:50:21 +0100, "Dave Pawson" <davep@...>
      > said:
      > > > 10.4.1 400 Bad Request
      > >
      > > I guess that's a part of my problem? There was no request to be bad?
      > > I'm just accepting posted data, hence 400 seems wrong?
      >
      > The POSTed data you are 'accepting' is always in the body of a
      > request. You can't get POSTed data without having a request to
      > extract it from.

      Which to me doesn't make sense Vincent. However.

      >
      > > Or should I be interpreting 'request' in a more general sense
      > > than an http get?
      >
      > A request is one type of HTTP 'message'. The term 'message' is
      > defined in the spec. A response is the other type of message.
      Not get and post?

      >
      > In brief: a request has a method name, a URI, a bunch of headers
      > encoding request metadata and entity metadata, and an entity body.
      > A client sends it to a server on a channel (TCP/IP socket), and
      > waits for a response on the same channel.
      >
      > A response has a status code, a bunch of metadata headers, and
      > an entity body. A server sends to a client in response to a
      > particular request, on the same channel it received the request
      > from.
      >
      > But I can't do this topic justice. The HTTP RFC spells this out,
      > you just need to spend some quality time with it.

      OK OK :-)
      I'll go read.


      >
      > > I prefer the idea of both a status code and content (xml message),
      > > just unsure if it was right.
      >
      > Given that the process is barfing on an XML parsing problem,
      > I would use the output of the parser as the response body.

      The 'barf' is of my own making. Just unsure which level it belongs to.
      Again, thanks for the comments.

      regards DaveP
    • Dave Pawson
      ... I was hoping to make this a machine to machine transfer Lee. As you say though, given enough prompts, a sysadmin will (hopefully) pick it up. regards DaveP
      Message 2 of 9 , Apr 25, 2005
        On Mon, 2005-04-25 at 09:56 -0600, Lee Fife wrote:
        > All,
        >
        > fwiw, the idiom I tend to use for errors is to encode a human-readable
        > description of the error in the response body.
        >
        > I figure that something went wrong and some person is eventually going
        > to debug this -- that's who the error message is for. The program on
        > the other end can work off HTTP status code.

        I was hoping to make this a machine to machine transfer Lee.
        As you say though, given enough prompts, a sysadmin will
        (hopefully) pick it up.

        regards DaveP
      • Lee Fife
        Right -- the machine to machine portion runs off the HTTP status codes. That tells you if the transfer worked or not. When it doesn t, there s something wrong.
        Message 3 of 9 , Apr 25, 2005
          Right -- the machine to machine portion runs off the HTTP status codes. That
          tells you if the transfer worked or not.

          When it doesn't, there's something wrong. And that typically means pulling a
          human into the loop somewhere. Could be that your code in turn received the
          content from somewhere else and just needs to forward the error on. Or maybe
          your code is at the point where it can process the parser error message and
          fix the posted body w/o human intervention.

          None of my code is at that point ...

          -Lee

          -----Original Message-----
          From: Dave Pawson [mailto:davep@...]
          Sent: Monday, April 25, 2005 10:38 AM
          To: Lee Fife
          Cc: 'Vincent D Murphy'; 'Rest List'
          Subject: RE: [rest-discuss] doPost.

          On Mon, 2005-04-25 at 09:56 -0600, Lee Fife wrote:
          > All,
          >
          > fwiw, the idiom I tend to use for errors is to encode a human-readable
          > description of the error in the response body.
          >
          > I figure that something went wrong and some person is eventually going
          > to debug this -- that's who the error message is for. The program on
          > the other end can work off HTTP status code.

          I was hoping to make this a machine to machine transfer Lee.
          As you say though, given enough prompts, a sysadmin will
          (hopefully) pick it up.

          regards DaveP
        Your message has been successfully submitted and would be delivered to recipients shortly.