10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I m using free zoho mail client application (similar to microsoft outlook) on my mobile for all my emails to mohtashim@techx.com
I wish to only recieve emails from my Linux Server details of which are: techx 3.10.0-514.10.2.el7.x86_64 #1 SMP CentOS release 7.3.1611 (Core).
I try the below... (20 Replies)
Discussion started by: mohtashims
20 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
I was curious if its possible to send an email (in reverse) to a linux server from an email client (like Lotus Notes, Outlook, etc...)?
I know it's possible to send an email FROM a Linux Server TO a email address, but I tried to just 'reply' to the Linux Servers
address that sent... (8 Replies)
Discussion started by: mrm5102
8 Replies
3. Red Hat
While sending mail from linux server we observed below logs,
stat=Deferred: Name server: xxxxxxxxxx.: host name lookup failure
Kindly suggest what we need to change?
Thanks in Advance (2 Replies)
Discussion started by: hydoss1
2 Replies
4. Shell Programming and Scripting
Let's say I have a script which creates a report. I use getopts to have different options available to the user. One of these options is -f which basically exports the output of script to a text file which user may give the name of that text file. How can I output the result to the requested file.... (3 Replies)
Discussion started by: bashily
3 Replies
5. Shell Programming and Scripting
HI All,
I am facing the problem with rmail ...
Actually my server is linux environment Redhot server.
To send a mail which command I have to use it . I want subject and I want to Include CC also
And body of the mail also there . But If I use rmail command it is not taking any options to... (1 Reply)
Discussion started by: ksrivani
1 Replies
6. UNIX for Dummies Questions & Answers
I'm new to Unix and web development but I'm in need to send an xml request to a web server Ican't find an easy way to do it from the command line, if somebody can help me with a sample would be amazing! my Unix says that curl is not installed so i was wondering if there is another way to test... (1 Reply)
Discussion started by: mpoblete
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command:
Code:
/usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
The script:
#!/bin/sh
#set -x
# set admin email so that you can get email
ADMIN="myemailaddress"
# set alert level
ALERT=4
df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
#echo $output
usep=$(echo $output | awk '{ print... (5 Replies)
Discussion started by: wbdevilliers
5 Replies
9. Shell Programming and Scripting
How to hit HTTP Post Request along with sending XML data to a Remote server through command line utility like wget (or anything else). (0 Replies)
Discussion started by: sandeep reddy
0 Replies
10. UNIX for Dummies Questions & Answers
Ok. I'm testing a new program component that is supposed to speed up our pipeline on the server. What it does is take in HEAD requests and shuffle them off to a different pipeline that is specially designed to handle HEAD requests quickly. The functionality works but now comes the question: how... (3 Replies)
Discussion started by: darkling235
3 Replies
Mojo::Server(3pm) User Contributed Perl Documentation Mojo::Server(3pm)
NAME
Mojo::Server - HTTP server base class
SYNOPSIS
use Mojo::Base 'Mojo::Server';
sub run {
my $self = shift;
# Get a transaction
my $tx = $self->build_tx;
# Emit "request" event
$self->emit(request => $tx);
}
DESCRIPTION
Mojo::Server is an abstract HTTP server base class.
EVENTS
Mojo::Server can emit the following events.
"request"
$server->on(request => sub {
my ($server, $tx) = @_;
...
});
Emitted when a request is ready and needs to be handled.
$server->unsubscribe('request');
$server->on(request => sub {
my ($server, $tx) = @_;
$tx->res->code(200);
$tx->res->headers->content_type('text/plain');
$tx->res->body('Hello World!');
$tx->resume;
});
ATTRIBUTES
Mojo::Server implements the following attributes.
"app"
my $app = $server->app;
$server = $server->app(MojoSubclass->new);
Application this server handles, defaults to a Mojo::HelloWorld object.
"app_class"
my $app_class = $server->app_class;
$server = $server->app_class('MojoSubclass');
Class of the application this server handles, defaults to the value of the "MOJO_APP" environment variable or Mojo::HelloWorld.
METHODS
Mojo::Server inherits all methods from Mojo::EventEmitter and implements the following new ones.
"new"
my $server = Mojo::Server->new;
Construct a new Mojo::Server object and subscribe to "request" event with default request handling.
"build_tx"
my $tx = $server->build_tx;
Let application build a transaction.
"load_app"
my $app = $server->load_app('./myapp.pl');
Load application from script.
say Mojo::Server->new->load_app('./myapp.pl')->home;
"run"
$server->run;
Run server. Meant to be overloaded in a subclass.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Server(3pm)