Welcome Guest, Not a member yet? Register   Sign In
How to use URL to define response type
#2

[eluser]rjsmith[/eluser]
With codeigniter, you'd probably do something like /class/method/type.
Your function would look like
Code:
public function method($type='html'){
    switch($type){
        case 'json':
        //code here
        break;
        ...
    }
}

Maybe in your routes you could define a route to move the type to the front

$routes['json/(:any)'] = '$1/json';


Messages In This Thread
How to use URL to define response type - by El Forum - 02-09-2013, 05:40 AM
How to use URL to define response type - by El Forum - 02-10-2013, 02:45 AM
How to use URL to define response type - by El Forum - 02-20-2013, 04:00 AM
How to use URL to define response type - by El Forum - 02-20-2013, 05:46 AM
How to use URL to define response type - by El Forum - 02-20-2013, 02:07 PM
How to use URL to define response type - by El Forum - 02-20-2013, 10:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB