Skip to content

Commit

Permalink
added rbx-2 to readme as supported version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcnulla committed Apr 10, 2016
1 parent 3c67990 commit db9a35e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
@@ -1,6 +1,6 @@
# rest_baby

Small rest client, supports ruby-2.0.0, ruby-2.1.0, ruby-2.2.0, jruby (based 1.9). You can only updated docs in ruby, not jruby.
Small rest client, supports ruby-2.0.0, ruby-2.1.0, ruby-2.2.0, jruby (based 1.9), and rbx-2. You can only updated docs in ruby, not jruby.

Item | Status
--- | ---
Expand Down Expand Up @@ -35,18 +35,18 @@ Or install it yourself as:
client = RestBaby::Client.new('http://gis.srh.noaa.gov/arcgis/rest/services/System')
# get(HEADERS, PATH, PARAMETERS)
# returns http response, usually the body is what is wanted.
message = JSON.parse(client.get( { 'Accept' => 'application/json' },
'/ReportingTools/GPServer/info/iteminfo',
message = JSON.parse(client.get( { 'Accept' => 'application/json' },
'/ReportingTools/GPServer/info/iteminfo',
{'f' => 'pjson'}).body)

client = RestBaby::Client.new('http://127.0.0.1:9001')
# post(BODY, HEADERS, PATH)
message = JSON.parse(client.post('{ "name": "Ben Franklin" }',
{ 'Content-Type' => 'application/json' },
message = JSON.parse(client.post('{ "name": "Ben Franklin" }',
{ 'Content-Type' => 'application/json' },
'/person').body)
# or
message = JSON.parse(client.post({ "name" => "Ben Franklin" }.to_json,
{ 'Content-Type' => 'application/json' },
# or
message = JSON.parse(client.post({ "name" => "Ben Franklin" }.to_json,
{ 'Content-Type' => 'application/json' },
'/person').body)
```

Expand Down

0 comments on commit db9a35e

Please sign in to comment.