| 150 | | # Performs a POST request with the given parameters. The parameters may |
|---|
| 151 | | # be +nil+, a Hash, or a string that is appropriately encoded |
|---|
| 152 | | # (application/x-www-form-urlencoded or multipart/form-data). The headers |
|---|
| 153 | | # should be a hash. The keys will automatically be upcased, with the |
|---|
| 154 | | # prefix 'HTTP_' added if needed. |
|---|
| 155 | | def post(path, parameters=nil, headers=nil) |
|---|
| 156 | | process :post, path, parameters, headers |
|---|
| | 153 | # keep the docs for #get |
|---|
| | 154 | %w( post put delete head ).each do |method| |
|---|
| | 155 | class_eval <<-EOV, __FILE__, __LINE__ |
|---|
| | 156 | def #{method}(path, parameters=nil, headers=nil) |
|---|
| | 157 | process :#{method}, path, parameters, headers |
|---|
| | 158 | end |
|---|
| | 159 | EOV |
|---|