Skip to content

Add more functionality to make the library more universal

Compare
Choose a tag to compare
@brianpilati brianpilati released this 01 Apr 22:27
· 9 commits to master since this release

Default Content-Type

The default Content-Type is application/json

To change the default Content-Type

  $restful->setContentType(<newContentType>);

Default URL Path Configuration and Authentication

The default URL Path is <baseURI>/<paht_to_data>/<token>/

If you need to add a special configuration to the URL path

  $restful->setPathConfiguration(<newPathConfiguration>);

Header Authentication

To set the authentication in the header request

  $restful->setHeaderProperty('<name_of_property>');

The full header property will be

  '<name_of_property>: <token>'