Can we block url based on method that is being used ?

Is there a way to do via policy to block url but when the method is POST ? or doing via irule is the only way ?

You can do It using hamish method (LTM policy).

You can also do it using Irule:

when HTTP_REQUEST {
  if {[string tolower [HTTP::method]] contains "post"}{
    log local0. "Forbidden HTTP method ([HTTP::method]) attempted by [IP::client_addr]"
    reject
  }
}

With Irule you can log URI, Source IP …

Regards,