Skip to content

Commit bcba998

Browse files
paultcochraneoalders
authored andcommitted
Format method bullet points as code in docs
While reading the docs I noticed that many code-related elements were formatted as code, however the bullet points documenting the available methods weren't. It seemed that formatting these text elements as code made the text easier to read, because this highlighted the code-like nature of the bullet point text.
1 parent c7f2e14 commit bcba998

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/Net/HTTP.pm

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ C<IO::Socket::INET>):
7777
7878
=over
7979
80-
=item $s = Net::HTTP->new( %options )
80+
=item C<< $s = Net::HTTP->new( %options ) >>
8181
8282
The C<Net::HTTP> constructor method takes the same options as
8383
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
103103
returns C<undef> and $@ contains the reason. After a successful
104104
connect, a C<Net:HTTP> object is returned.
105105
106-
=item $s->host
106+
=item C<< $s->host >>
107107
108108
Get/set the default value of the C<Host> header to send. The $host
109109
must not be set to an empty string (or C<undef>) for HTTP/1.1.
110110
111-
=item $s->keep_alive
111+
=item C<< $s->keep_alive >>
112112
113113
Get/set the I<keep-alive> value. If this value is TRUE then the
114114
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.
117117
The actual headers set will depend on the value of the C<http_version>
118118
and C<peer_http_version> attributes.
119119
120-
=item $s->send_te
120+
=item C<< $s->send_te >>
121121
122122
Get/set the a value indicating if the request will be sent with a "TE"
123123
header to indicate the transfer encodings that the server can choose to
124124
use. The list of encodings announced as accepted by this client depends
125125
on availability of the following modules: C<Compress::Raw::Zlib> for
126126
I<deflate>, and C<IO::Compress::Gunzip> for I<gzip>.
127127
128-
=item $s->http_version
128+
=item C<< $s->http_version >>
129129
130130
Get/set the HTTP version number that this client should announce.
131131
This value can only be set to "1.0" or "1.1". The default is "1.1".
132132
133-
=item $s->peer_http_version
133+
=item C<< $s->peer_http_version >>
134134
135135
Get/set the protocol version number of our peer. This value will
136136
initially be "1.0", but will be updated by a successful
137137
read_response_headers() method call.
138138
139-
=item $s->max_line_length
139+
=item C<< $s->max_line_length >>
140140
141141
Get/set a limit on the length of response line and response header
142142
lines. The default is 8192. A value of 0 means no limit.
143143
144-
=item $s->max_header_length
144+
=item C<< $s->max_header_length >>
145145
146146
Get/set a limit on the number of header lines that a response can
147147
have. The default is 128. A value of 0 means no limit.
148148
149-
=item $s->format_request($method, $uri, %headers, [$content])
149+
=item C<< $s->format_request($method, $uri, %headers, [$content]) >>
150150
151151
Format a request message and return it as a string. If the headers do
152152
not include a C<Host> header, then a header is inserted with the value
@@ -157,16 +157,16 @@ C<keep_alive> attribute.
157157
If $content is given (and it is non-empty), then a C<Content-Length>
158158
header is automatically added unless it was already present.
159159
160-
=item $s->write_request($method, $uri, %headers, [$content])
160+
=item C<< $s->write_request($method, $uri, %headers, [$content]) >>
161161
162162
Format and send a request message. Arguments are the same as for
163163
format_request(). Returns true if successful.
164164
165-
=item $s->format_chunk( $data )
165+
=item C<< $s->format_chunk( $data ) >>
166166
167167
Returns the string to be written for the given chunk of data.
168168
169-
=item $s->write_chunk($data)
169+
=item C<< $s->write_chunk($data) >>
170170
171171
Will write a new chunk of request entity body data. This method
172172
should only be used if the C<Transfer-Encoding> header with a value of
@@ -176,20 +176,20 @@ body data.
176176
177177
Returns true if successful.
178178
179-
=item $s->format_chunk_eof( %trailers )
179+
=item C<< $s->format_chunk_eof( %trailers ) >>
180180
181181
Returns the string to be written for signaling EOF when a
182182
C<Transfer-Encoding> of C<chunked> is used.
183183
184-
=item $s->write_chunk_eof( %trailers )
184+
=item C<< $s->write_chunk_eof( %trailers ) >>
185185
186186
Will write eof marker for chunked data and optional trailers. Note
187187
that trailers should not really be used unless is was signaled
188188
with a C<Trailer> header.
189189
190190
Returns true if successful.
191191
192-
=item ($code, $mess, %headers) = $s->read_response_headers( %opts )
192+
=item C<< ($code, $mess, %headers) = $s->read_response_headers( %opts ) >>
193193
194194
Read response headers from server and return it. The $code is the 3
195195
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,
225225
then no exception will be raised and this method will always
226226
return a response code.
227227
228-
=item $n = $s->read_entity_body($buf, $size);
228+
=item C<< $n = $s->read_entity_body($buf, $size); >>
229229
230230
Reads chunks of the entity body content. Basically the same interface
231231
as for read() and sysread(), but the buffer offset argument is not
@@ -244,19 +244,19 @@ you made the socket non-blocking.
244244
This method will raise exceptions (die) if the server does not speak
245245
proper HTTP. This can only happen when reading chunked data.
246246
247-
=item %headers = $s->get_trailers
247+
=item C<< %headers = $s->get_trailers >>
248248
249249
After read_entity_body() has returned 0 to indicate end of the entity
250250
body, you might call this method to pick up any trailers.
251251
252-
=item $s->_rbuf
252+
=item C<< $s->_rbuf >>
253253
254254
Get/set the read buffer content. The read_response_headers() and
255255
read_entity_body() methods use an internal buffer which they will look
256256
for data before they actually sysread more from the socket itself. If
257257
they read too much, the remaining data will be left in this buffer.
258258
259-
=item $s->_rbuf_length
259+
=item C<< $s->_rbuf_length >>
260260
261261
Returns the number of bytes in the read buffer. This should always be
262262
the same as:

0 commit comments

Comments
 (0)