Fix optional params

Implement build url for method optional params.