Skip to content

Commit 13144ec

Browse files
committed
updates to readme with some notes about version history and avoid 1.0.2 and 1.0.3
1 parent f495d7c commit 13144ec

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

README.markdown

+14-19
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ POST request
3737
puts res.body
3838
```
3939

40-
PATCH request
41-
```
42-
res = Curl.patch("https://your-server.com/endpoint", {post: "this"}.to_json) {|http|
43-
http.headers["Content-Type"] = "application/json"
44-
}
45-
puts res.code
46-
puts res.head
47-
puts res.body
48-
```
49-
50-
51-
5240
## You will need
5341

5442
* A working Ruby installation (`2.0.0+` will work but `2.1+` preferred) (it's possible it still works with 1.8.7 but you'd have to tell me if not...)
@@ -64,14 +52,21 @@ tested and reported to work across a variety of platforms / rubies)
6452

6553
| Gem Version | Release Date | libcurl versions |
6654
| ----------- | ----------- | ---------------- |
67-
| 1.0.0 | Jan 2022 | 7.58 - 7.81 |
55+
| 1.0.5 | Jan 2023 | 7.58 - 7.87 |
56+
| 1.0.4 | Jan 2023 | 7.58 - 7.87 |
57+
| 1.0.3* | Dec 2022 | 7.58 - 7.87 |
58+
| 1.0.2* | Dec 2022 | 7.58 - 7.87 |
59+
| 1.0.1 | Apr 2022 | 7.58 - 7.87 |
60+
| 1.0.0 | Jan 2022 | 7.58 - 7.87 |
6861
| 0.9.8 | Jan 2019 | 7.58 - 7.81 |
6962
| 0.9.7 | Nov 2018 | 7.56 - 7.60 |
7063
| 0.9.6 | May 2018 | 7.51 - 7.59 |
7164
| 0.9.5 | May 2018 | 7.51 - 7.59 |
7265
| 0.9.4 | Aug 2017 | 7.41 - 7.58 |
7366
| 0.9.3 | Apr 2016 | 7.26 - 7.58 |
7467

68+
```*avoid using these version are known to have issues with segmentation faults```
69+
7570
## Installation...
7671

7772
... will usually be as simple as:
@@ -137,36 +132,36 @@ require 'curb'
137132

138133
```ruby
139134
http = Curl.get("http://www.google.com/")
140-
puts http.body_str
135+
puts http.body
141136

142137
http = Curl.post("http://www.google.com/", {:foo => "bar"})
143-
puts http.body_str
138+
puts http.body
144139

145140
http = Curl.get("http://www.google.com/") do |http|
146141
http.headers['Cookie'] = 'foo=1;bar=2'
147142
end
148-
puts http.body_str
143+
puts http.body
149144
```
150145

151146
### Simple fetch via HTTP:
152147

153148
```ruby
154149
c = Curl::Easy.perform("http://www.google.co.uk")
155-
puts c.body_str
150+
puts c.body
156151
```
157152

158153
Same thing, more manual:
159154

160155
```ruby
161156
c = Curl::Easy.new("http://www.google.co.uk")
162157
c.perform
163-
puts c.body_str
158+
puts c.body
164159
```
165160

166161
### Additional config:
167162

168163
```ruby
169-
Curl::Easy.perform("http://www.google.co.uk") do |curl|
164+
http = Curl::Easy.perform("http://www.google.co.uk") do |curl|
170165
curl.headers["User-Agent"] = "myapp-0.0"
171166
curl.verbose = true
172167
end

0 commit comments

Comments
 (0)