Line: 39 to 39 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | ObjectMethod sendEmail ($text,$retries) -> $error | |||||||
> > | ObjectMethod sendEmail ($text,$tries) -> $error | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Send an email specified as MIME format content. Date: ...\nFrom: ...\nTo: ...\nCC: ...\nSubject: ...\n\nMailBody... |
Line: 10 to 10 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | getExternalResource( $url, @headers | |||||||
> > | ObjectMethod registerExternalHTTPHandler (\&fn) | |||||||
Changed: | ||||||||
< < | Get whatever is at the other end of a URL (using an HTTP GET request). Will
only work for encrypted protocols such as https if the LWP CPAN module is
installed.
Note that the Optional headers may be supplied of form 'name1', 'value1', 'name2', 'value2'. Do not add a User-Agent header, it will be added.
The
Note that if LWP is not available, this function:
In the event of the server returning an error, then Note: Callers can easily check the availability of other HTTP::Response methods as follows:
my $response = TWiki::Func::getExternalResource($url); if (!$response->is_error() && $response->isa('HTTP::Response')) { $text = $response->content(); # ... other methods of HTTP::Response may be called } else { # ... only the methods listed above may be called } | |||||||
> > | See TWikiFuncDotPm#RegisterExternalHTTPHandler | |||||||
Changed: | ||||||||
< < | setMailHandler( \&fn ) | |||||||
> > |
ObjectMethod getExternalResource ($url,\@headers,\%params) -> $responseSee TWikiFuncDotPm#GetExternalResource
ObjectMethod postExternalResource ($url,$content,\@headers,\%params) -> $responseSee TWikiFuncDotPm#PostExternalResource
ObjectMethod setMailHandler (\&fn) | |||||||
|
Line: 10 to 10 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | getExternalResource( $url ) -> $response | |||||||
> > | getExternalResource( $url, @headers | |||||||
Get whatever is at the other end of a URL (using an HTTP GET request). Will
only work for encrypted protocols such as https if the LWP CPAN module is
installed.
Note that the | ||||||||
Changed: | ||||||||
< < | the relevant RFC. Any proxy set in configure is honoured. | |||||||
> > | the relevant RFC. Any proxy set in configure is honored.
Optional headers may be supplied of form 'name1', 'value1', 'name2', 'value2'. Do not add a User-Agent header, it will be added. | |||||||
The $response is an object that is known to implement the following subset of
the methods of LWP::Response . It may in fact be an LWP::Response object, | ||||||||
Line: 49 to 52 | ||||||||
my $response = TWiki::Func::getExternalResource($url); if (!$response->is_error() && $response->isa('HTTP::Response')) { | ||||||||
Changed: | ||||||||
< < | ... other methods of HTTP::Response may be called | |||||||
> > | $text = $response->content(); # ... other methods of HTTP::Response may be called | |||||||
} else { | ||||||||
Changed: | ||||||||
< < | ... only the methods listed above may be called | |||||||
> > | # ... only the methods listed above may be called | |||||||
} |
Line: 5 to 5 | ||||||||
---|---|---|---|---|---|---|---|---|
On this page:
| ||||||||
Changed: | ||||||||
< < | ObjectMethod getUrl ($protocol,$host,$port,$url,$user,$pass) -> $text | |||||||
> > | ObjectMethod finish ()Break circular references. | |||||||
Deleted: | ||||||||
< < | Get the text at the other end of a URL | |||||||
Added: | ||||||||
> > | getExternalResource( $url ) -> $response
Get whatever is at the other end of a URL (using an HTTP GET request). Will
only work for encrypted protocols such as
Note that the
The
Note that if LWP is not available, this function:
In the event of the server returning an error, then Note: Callers can easily check the availability of other HTTP::Response methods as follows:
my $response = TWiki::Func::getExternalResource($url); if (!$response->is_error() && $response->isa('HTTP::Response')) { ... other methods of HTTP::Response may be called } else { ... only the methods listed above may be called } | |||||||
setMailHandler( \&fn ) |
Line: 5 to 5 | ||||||||
---|---|---|---|---|---|---|---|---|
On this page:
| ||||||||
Changed: | ||||||||
< < | ObjectMethod getUrl ($host,$port,$url,$user,$pass,$header) -> $text | |||||||
> > | ObjectMethod getUrl ($protocol,$host,$port,$url,$user,$pass) -> $text | |||||||
Get the text at the other end of a URL |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > | Package
|