Jerin Raj
Jerin Raj

Reputation: 387

onHTTPRequest() is not invoked when calling wowza server

I'm new in wowza and I am trying to make an app that will play the stream from wowza and it works fine. I implemented a functionality (inside the onHTTPRequest() ) that should work while calling an api; but currently its not working. If somebody have some info i will be very grateful... code is here:

I call a url as: http://localhost:1935/functionApi

VHost.xml as:

<HTTPProvider>
    <BaseClass>com.sample.SomeModule</BaseClass>
    <RequestFilters>functionApi*</RequestFilters>
    <AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>

Java class that would use this call is as follows:

package com.sample;
import com.wowza.wms.http.HTTProvider2Base;
import com.wowza.wms.http.IHTTPRequest;
import com.wowza.wms.http.IHTTPResponse;
import com.wowza.wms.logging.WMSLogger;
import com.wowza.wms.logging.WMSLoggerFactory;
import com.wowza.wms.vhost.IVHost;

public class SomeModule extends HTTProvider2Base {

public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) {

    getLogger().info("====== Inside the onHTTPRequest ====" ); 
    /* Our working code which work correctly 

 */   
}

private WMSLogger getLogger(){
    return WMSLoggerFactory.getLogger(SomeModule.class);
}
}

Upvotes: 3

Views: 231

Answers (1)

user773737
user773737

Reputation:

It doesn't work on port 1935. It should work on port 8086, so you should be calling http://localhost:8086/functionApi

See also: https://www.wowza.com/forums/content.php?733-How-to-create-an-HTTP-Provider

Upvotes: 1

Related Questions