public ServiceCall < RegisterStatus > registerCallback ( RegisterCallbackOptions registerCallbackOptions ) { Validator . notNull ( registerCallbackOptions , "registerCallbackOptions cannot be null" ) ; String [ ] pathSegments = { "v1/register_callback" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "registerCallback" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; builder . query ( "callback_url" , registerCallbackOptions . callbackUrl ( ) ) ; if ( registerCallbackOptions . userSecret ( ) != null ) { builder . query ( "user_secret" , registerCallbackOptions . userSecret ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( RegisterStatus . class ) ) ; }
Register a callback .