@@ -77,7 +77,7 @@ C<IO::Socket::INET>):
77
77
78
78
=over
79
79
80
- =item $s = Net::HTTP->new( %options )
80
+ =item C<< $s = Net::HTTP->new( %options ) >>
81
81
82
82
The C<Net::HTTP > constructor method takes the same options as
83
83
C<IO::Socket::INET > 's as well as these:
@@ -103,12 +103,12 @@ If unable to connect to the given HTTP server then the constructor
103
103
returns C<undef > and $@ contains the reason. After a successful
104
104
connect, a C<Net:HTTP > object is returned.
105
105
106
- =item $s->host
106
+ =item C<< $s->host >>
107
107
108
108
Get/set the default value of the C<Host > header to send. The $host
109
109
must not be set to an empty string (or C<undef > ) for HTTP/1.1.
110
110
111
- =item $s->keep_alive
111
+ =item C<< $s->keep_alive >>
112
112
113
113
Get/set the I<keep-alive > value. If this value is TRUE then the
114
114
request will be sent with headers indicating that the server should try
@@ -117,36 +117,36 @@ to keep the connection open so that multiple requests can be sent.
117
117
The actual headers set will depend on the value of the C<http_version >
118
118
and C<peer_http_version > attributes.
119
119
120
- =item $s->send_te
120
+ =item C<< $s->send_te >>
121
121
122
122
Get/set the a value indicating if the request will be sent with a "TE"
123
123
header to indicate the transfer encodings that the server can choose to
124
124
use. The list of encodings announced as accepted by this client depends
125
125
on availability of the following modules: C<Compress::Raw::Zlib > for
126
126
I<deflate > , and C<IO::Compress::Gunzip > for I<gzip > .
127
127
128
- =item $s->http_version
128
+ =item C<< $s->http_version >>
129
129
130
130
Get/set the HTTP version number that this client should announce.
131
131
This value can only be set to "1.0" or "1.1". The default is "1.1".
132
132
133
- =item $s->peer_http_version
133
+ =item C<< $s->peer_http_version >>
134
134
135
135
Get/set the protocol version number of our peer. This value will
136
136
initially be "1.0", but will be updated by a successful
137
137
read_response_headers() method call.
138
138
139
- =item $s->max_line_length
139
+ =item C<< $s->max_line_length >>
140
140
141
141
Get/set a limit on the length of response line and response header
142
142
lines. The default is 8192. A value of 0 means no limit.
143
143
144
- =item $s->max_header_length
144
+ =item C<< $s->max_header_length >>
145
145
146
146
Get/set a limit on the number of header lines that a response can
147
147
have. The default is 128. A value of 0 means no limit.
148
148
149
- =item $s->format_request($method, $uri, %headers, [$content])
149
+ =item C<< $s->format_request($method, $uri, %headers, [$content]) >>
150
150
151
151
Format a request message and return it as a string. If the headers do
152
152
not include a C<Host > header, then a header is inserted with the value
@@ -157,16 +157,16 @@ C<keep_alive> attribute.
157
157
If $content is given (and it is non-empty), then a C<Content-Length >
158
158
header is automatically added unless it was already present.
159
159
160
- =item $s->write_request($method, $uri, %headers, [$content])
160
+ =item C<< $s->write_request($method, $uri, %headers, [$content]) >>
161
161
162
162
Format and send a request message. Arguments are the same as for
163
163
format_request(). Returns true if successful.
164
164
165
- =item $s->format_chunk( $data )
165
+ =item C<< $s->format_chunk( $data ) >>
166
166
167
167
Returns the string to be written for the given chunk of data.
168
168
169
- =item $s->write_chunk($data)
169
+ =item C<< $s->write_chunk($data) >>
170
170
171
171
Will write a new chunk of request entity body data. This method
172
172
should only be used if the C<Transfer-Encoding > header with a value of
@@ -176,20 +176,20 @@ body data.
176
176
177
177
Returns true if successful.
178
178
179
- =item $s->format_chunk_eof( %trailers )
179
+ =item C<< $s->format_chunk_eof( %trailers ) >>
180
180
181
181
Returns the string to be written for signaling EOF when a
182
182
C<Transfer-Encoding > of C<chunked > is used.
183
183
184
- =item $s->write_chunk_eof( %trailers )
184
+ =item C<< $s->write_chunk_eof( %trailers ) >>
185
185
186
186
Will write eof marker for chunked data and optional trailers. Note
187
187
that trailers should not really be used unless is was signaled
188
188
with a C<Trailer > header.
189
189
190
190
Returns true if successful.
191
191
192
- =item ($code, $mess, %headers) = $s->read_response_headers( %opts )
192
+ =item C<< ($code, $mess, %headers) = $s->read_response_headers( %opts ) >>
193
193
194
194
Read response headers from server and return it. The $code is the 3
195
195
digit HTTP status code (see L<HTTP::Status> ) and $mess is the textual
@@ -225,7 +225,7 @@ C<max_line_length> and C<max_header_length> checks are turned off,
225
225
then no exception will be raised and this method will always
226
226
return a response code.
227
227
228
- =item $n = $s->read_entity_body($buf, $size);
228
+ =item C<< $n = $s->read_entity_body($buf, $size); >>
229
229
230
230
Reads chunks of the entity body content. Basically the same interface
231
231
as for read() and sysread(), but the buffer offset argument is not
@@ -244,19 +244,19 @@ you made the socket non-blocking.
244
244
This method will raise exceptions (die) if the server does not speak
245
245
proper HTTP. This can only happen when reading chunked data.
246
246
247
- =item %headers = $s->get_trailers
247
+ =item C<< %headers = $s->get_trailers >>
248
248
249
249
After read_entity_body() has returned 0 to indicate end of the entity
250
250
body, you might call this method to pick up any trailers.
251
251
252
- =item $s->_rbuf
252
+ =item C<< $s->_rbuf >>
253
253
254
254
Get/set the read buffer content. The read_response_headers() and
255
255
read_entity_body() methods use an internal buffer which they will look
256
256
for data before they actually sysread more from the socket itself. If
257
257
they read too much, the remaining data will be left in this buffer.
258
258
259
- =item $s->_rbuf_length
259
+ =item C<< $s->_rbuf_length >>
260
260
261
261
Returns the number of bytes in the read buffer. This should always be
262
262
the same as:
0 commit comments