Giter VIP home page Giter VIP logo

restcookbook's Introduction

Contributing to the REST cookbook

The REST cookbook website uses Jekyll, a simple yet powerful blog engine that easily allows for creating simple websites like these.

Contributing to our site is simple:

  • Fork the website to your own github account.
  • Clone your repository onto your computer. Make sure you create a new branch, and not use the master branch.
  • Create a new page inside the /_posts/* directory. This HAS GOT TO BE IN THE FORMAT OF YEAR-MONTH-DAY-FILENAME.html!!!
  • Add and commit your changes, and push it to your repository.
  • Create a pull request and we will try and merge your recipe.

Creating a new page

As said, a page must be placed in the _post directory, and in the year-month-day-filename.html format. Otherwise it wont get picked up by the system. Every post should look somewhat like this:

---
layout: recipe
title: <Title>
category: <Category>
author: <your name>
author_email: <your email address>
---
<h2>Title</h2>

<p>Your recipe</p>

The author_email address is optional. Make sure the category name is one of the existing category names (case matters), otherwise your posting will be added inside a new topic. If you have troubles creating a new page, take a look at one of the existing pages, or ask us for help.

Regenerating a new site

There are two ways to display your new site:

Run as a standalone webserver:

  • Start jekyll in your repository root with: jekyll server
  • Browse to http://:4000 to see your site

Run inside an existing webserver:

  • Make sure your use the _site directory as your document root

When you make changes, you need to regenerate your website. This can be done by running jekyll without any parameters. This regenerates the _site directory.

restcookbook's People

Contributors

adrianblynch avatar bencevans avatar blom avatar boscomw avatar brandondrew avatar cih avatar dead0r avatar ferhatelmas avatar fiddlerpianist avatar jasssonpet avatar jaytaph avatar lanthaler avatar maximization avatar mosherubin avatar mstalfoort avatar rlaszlo avatar rogeriopradoj avatar spaceone avatar steveklabnik avatar thandaanda avatar tpei avatar tvlooy avatar vvvvalvalval avatar we11adam avatar wilsaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

restcookbook's Issues

Isn't PATCH idempotent?

According to the "Overview of (some) HTTP-Methods" table in "What are idempotent and/or safe methods?", PATCH is not idempotent. As far as I understood it should be since, repeating the same PATCH call over and over should result in the same response. Or did I miss something there?

Will u a add a license to the book?

Hi Joshua. It's a good read to start with REST API, and i would love to translate it into Chinese. Only for the purpose to spread it as an open-source book. I'm wondering if i need any kind of permission.

the use of the Location header with HTTP 202 is not actually supported

Hi,

I stumbled upon this site: http://restcookbook.com/Resources/asynchroneous-operations/ saying:

HTTP/1.1 202 Accepted
Location: /queue/12345

This location can store information about the status of the actual resource: an ETA on when it will be created, what is currently being done or processed.

Apparently, this is not true, as things like PHP enforce a different interpretation of RFC 2616 with regard to the Location header, cf.

https://bugs.php.net/bug.php?id=70273
https://bugs.php.net/bug.php?id=74535

Please fix this suggestion to avoid recommending Location then. TIA.

Code-on-demand

Should "...communication so servers are not.." be "...communication so clients are not..." ?

Site Link

I'd suggest setting the link in the repository settings (or README) to the main website ;)

URIs in HATEAOS post

One of the principles of REST, AFAIK, is that Nouns are good, Verbs are bad. This is intuitive as, in REST, a resource is supposed to be a representation of an element, and not a process. The verbs, on the other hands, are provided by the uniform interface that is defined by the RESTful API, and that is agreed upon by both the server and the client (see section 5.1.5 of Fielding's dissertation). In the case of a web API using HTML, the verbs would namely be the HTTP methods.

This constraint seems to be violated in the examples in the HATEAOS post:

<link rel="deposit" href="/account/12345/deposit" />
<link rel="withdraw" href="/account/12345/withdraw" />
<link rel="transfer" href="/account/12345/transfer" />
<link rel="close" href="/account/12345/close" />

I propose changing withdraw to withdrawal. deposit and transfer remain unchanged but it could be indicated that they refer to nouns, not verbs. The actions withdraw, transfer, and deposit would be equivalent to doing a POST on the corresponding resource. The resources could then be accessed with GET calls.

As for closing the account, this would be handled in a RESTful API using a closed flag within the account attributes. Closing an account would be equivalent to a PUT setting this flag. To prevent closing accounts that are in the red, the API would forbid PUT operations on that account until it is in the green again (and the user can know what options are available by issuing an OPTIONS request to the URI of the account). I don't think this particular feature should be kept in this post as it is not tied to the concept of HATEAOS.

PATCH is said to be and not be idempotent

In the "When should we use the PATCH HTTP method?" page, the content of the page say PATCH is idempotent as it will always change the same object in the same way.

In the caveat section, the PATCH is neither safe nor idempotent. Which is contradicting the previous info. The page on what method are safe or idempotent also say PATCH isn't idempotent.

twitter bootstrap

hi guys,
why don't use twitter bootstrap as main css? i'm available to help substituting (or adding alongside) bootstrap to the current jekill implementation.
what do you think?

thanks for having released this great project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.