Revision: 1248
Author: christian.wuerker
Date: Tue Aug 18 20:15:52 2015 UTC
Log: Fixed method order.
https://code.google.com/p/cmclasses/source/detail?r=1248
Modified:
/trunk/src/Net/HTTP/Request.php
=======================================
--- /trunk/src/Net/HTTP/Request.php Tue Aug 18 19:52:28 2015 UTC
+++ /trunk/src/Net/HTTP/Request.php Tue Aug 18 20:15:52 2015 UTC
@@ -123,7 +123,7 @@
}*/
$this->setMethod( strtoupper( getEnv( 'REQUEST_METHOD' ) ) ); //
store HTTP method
- $this->body = file_get_contents( "php://input" ); // store
raw POST, FILE or PUT data
+ $this->body = file_get_contents( "php://input" ); // store
raw POST, PUT or FILE data
}
public function fromString( $request )
@@ -167,20 +167,6 @@
return NULL;
throw new InvalidArgumentException( 'Invalid key "'.$key.'" in
source "'.$source.'"' );
}
-
- /**
- * Returns list of all HTTP headers received.
- * Acts as getHeadersByName if header key name is given.
- * @access public
- * @param string $name Key name of header (optional)
- * @return array List of Net_HTTP_Header_Field instances
- */
- public function getHeaders( $name = NULL )
- {
- if( $name )
- return $this->getHeadersByName( $name );
- return $this->headers->getFields();
- }
/**
* Return HTTP header field by a specified header name.
@@ -202,6 +188,20 @@
return NULL;
throw new RuntimeException( sprintf( 'No header set by name "%s"', $name
) );
}
+
+ /**
+ * Returns list of all HTTP headers received.
+ * Acts as getHeadersByName if header key name is given.
+ * @access public
+ * @param string $name Key name of header (optional)
+ * @return array List of Net_HTTP_Header_Field instances
+ */
+ public function getHeaders( $name = NULL )
+ {
+ if( $name )
+ return $this->getHeadersByName( $name );
+ return $this->headers->getFields();
+ }
/**
* Returns list of HTTP header fields with a specified header name.