ciao icon indicating copy to clipboard operation
ciao copied to clipboard

Seperate out the request header and body like response is.

Open chrisjenx opened this issue 12 years ago • 4 comments

Twice now i have implimented a request wrong because the Request documentation is a bit messy.

Request

{
  "protocol": "http:",
  "host": "localhost",
  "method": "PUT",
  "port": 4000,
  "path": "/user/me",
  "headers": {
    "User-Agent": "Ciao/Client 1.0",
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Cookie": "connect.sid=s%3AyJOE%2BfgCvb7Wf6FIIXFRULnA.uUjr3vngv9u8V9ROExsECg3ydo30NdlpLNj1CFDSvTE"
  },
  "body": {
    "first_name": "gigio",
    "last_name": "topo",
   }
}

Could it be more like the request:

Request

Header

{
  "protocol": "http:",
  "host": "localhost",
  "method": "PUT",
  "port": 4000,
  "path": "/user/me",
  "headers": {
    "User-Agent": "Ciao/Client 1.0",
    "Accept": "application/json",
    "Content-Type": "application/json",
  }
}

Body

{
    "first_name": "gigio",
    "last_name": "topo",
    "email": "[email protected]",
  }

chrisjenx avatar Apr 16 '13 10:04 chrisjenx

Hey chris, not sure what you're asking for exactly? Are you proposing that we define the request in 2 sections, one being "host+headers" and the second being "body"?

missinglink avatar Apr 18 '13 16:04 missinglink

Would be nice if the generated documentation request header/body is seperated so when looking at the markdown its clearer.

This is a visual change on the generated docs nothing else really.

On 18 April 2013 17:39, Peter Johnson [email protected] wrote:

Hey chris, not sure what you're asking for exactly? Are you proposing that we define the request in 2 sections, one being "host+headers" and the second being "body"?

— Reply to this email directly or view it on GitHubhttps://github.com/missinglink/ciao/issues/30#issuecomment-16587919 .

chrisjenx avatar Apr 18 '13 16:04 chrisjenx

Oh I see, no problem, I'll have a look in to it.

missinglink avatar Apr 18 '13 16:04 missinglink

Cheers. :) On 18 Apr 2013 17:59, "Peter Johnson" [email protected] wrote:

Oh I see, no problem, I'll have a look in to it.

— Reply to this email directly or view it on GitHubhttps://github.com/missinglink/ciao/issues/30#issuecomment-16589035 .

chrisjenx avatar Apr 18 '13 17:04 chrisjenx