Parent

Class Index [+]

Quicksearch

Curl::PostField

Public Class Methods

> click to toggle source

Create a new Curl::PostField, supplying the field name, content, and, optionally, Content-type (curl will attempt to determine this if not specified).

The block form allows a block to supply the content for this field, called during the perform. The block should return a ruby string with the field data.

static VALUE ruby_curl_postfield_new_content(int argc, VALUE *argv, VALUE klass) 
> click to toggle source

Create a new Curl::PostField for a file upload field, supplying the local filename to read from, and optionally the remote filename (defaults to the local name).

The block form allows a block to supply the content for this field, called during the perform. The block should return a ruby string with the field data.

static VALUE ruby_curl_postfield_new_file(int argc, VALUE *argv, VALUE klass) 

Public Instance Methods

content => "content" click to toggle source

Obtain the POST field content for this PostField.

 
static VALUE ruby_curl_postfield_content_get(VALUE self) 
content = "content" => "content" click to toggle source

Set the POST field content for this PostField. Ignored when a content_proc is supplied via either +Curl::PostField.file+ or set_content_proc.

static VALUE ruby_curl_postfield_content_set(VALUE self, VALUE content) 
content_type => "content_type" click to toggle source

Get the POST field Content-type for this PostField.

 
static VALUE ruby_curl_postfield_content_type_get(VALUE self) 
content_type = "content_type" => "content_type" click to toggle source

Set the POST field Content-type for this PostField.

static VALUE ruby_curl_postfield_content_type_set(VALUE self, VALUE content_type) 
local_file => "filename" click to toggle source

Get the POST field local filename for this PostField (when performing a file upload).

 
static VALUE ruby_curl_postfield_local_file_get(VALUE self) 
local_file = "filename" => "filename" click to toggle source

Set the POST field local filename for this PostField (when performing a file upload). Ignored when a content_proc is supplied via either +Curl::PostField.file+ or set_content_proc.

static VALUE ruby_curl_postfield_local_file_set(VALUE self, VALUE local_file) 
name => "name" click to toggle source

Obtain the POST field name for this PostField.

 
static VALUE ruby_curl_postfield_name_get(VALUE self) 
name = "name" => "name" click to toggle source

Set the POST field name for this PostField.

static VALUE ruby_curl_postfield_name_set(VALUE self, VALUE name) 
local_file => "filename" click to toggle source

Get the POST field remote filename for this PostField (when performing a file upload).

 
static VALUE ruby_curl_postfield_remote_file_get(VALUE self) 
remote_file = "filename" => "filename" click to toggle source

Set the POST field remote filename for this PostField (when performing a file upload). If no remote filename is provided, and no content_proc is supplied, the local filename is used. If no remote filename is specified when a content_proc is used, an exception will be raised during the perform.

static VALUE ruby_curl_postfield_remote_file_set(VALUE self, VALUE remote_file) 
} => <old proc> click to toggle source

Set a content proc for this field. This proc will be called during the perform to supply the content for this field, overriding any setting of content or local_file.

static VALUE ruby_curl_postfield_content_proc_set(int argc, VALUE *argv, VALUE self) 
to_s() click to toggle source
Alias for: to_str
to_s => "name=value" click to toggle source

Obtain a String representation of this PostField in url-encoded format. This is used to construct the post data for non-multipart POSTs.

Only content fields may be converted to strings.

static VALUE ruby_curl_postfield_to_str(VALUE self) 
Also aliased as: to_s

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.