我正在尝试使用 nethttptransport.java
class上传视频(如 googlenethttptransport.newtrustedtransport()获得新端口。因此,正在对每个呼叫进行命中更改的 url 。
例如 -
url1 = http:// localhost:57005/callback
url2 = http:// localhost:57296/callback
Google不允许未知的URL。我已经注册了几个URL,但是每次都会收到一个新端口,因此每个呼叫的URL都会更改。
在每个呼叫上,我都会收到此错误:
如果我能得到静态端口,我的问题将得到解决。
而不是,
final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
我需要这样的东西:
final NetHttpTransport httpTransport = 8080;
失败的代码:
final NetHttpTransport httpTransport = new NetHttpTransport();
每次仍在给出一个新端口。
I am trying to upload a video on youtube using NetHttpTransport.java
class (as defined in the example created by google). The problem is that everytime I get a new port from GoogleNetHttpTransport.newTrustedTransport()
. So the URL that is making a hit changes on every call.
For example-
URL1 = http://localhost:57005/Callback
URL2 = http://localhost:57296/Callback
Google won't allow an unknown URL. I have registered several URL's but I am getting a new port everytime, so the URL changes on every call.

On each call I get this error:

My problem would be solved if I can get a static port.
Instead of,
final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
I need something like this:
final NetHttpTransport httpTransport = 8080;
Code that failed:
final NetHttpTransport httpTransport = new NetHttpTransport();
is still giving a new port everytime.
发布评论