Coder Social home page Coder Social logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
Can you provide an http log?

https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Logging
_HTTP_Server_Traffic

Original comment by [email protected] on 4 Dec 2013 at 6:21

from gtm-oauth2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
Sure, here's the log:



youtube.videos.insert

2013-12-04 09:04:10 +0000
Request: POST 
https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false
Request headers:
  Accept: application/json-rpc
  Authorization: Bearer _snip_
  Cache-Control: no-cache
  Content-Type: application/json-rpc; charset=utf-8
  User-Agent: jp.nagisa-inc.FOOBAR/1.0 google-api-objc-client/2.0 iPhone/7.0.2 (gzip)
  X-Upload-Content-Length: 9680229
  X-Upload-Content-Type: video/x-m4v

Request body: (383 bytes)
{
  "method" : "youtube.videos.insert",
  "id" : "gtl_1",
  "jsonrpc" : "2.0",
  "params" : {
    "part" : "snippet,status",
    "resource" : {
      "status" : {
        "privacyStatus" : "public"
      },
      "snippet" : {
        "description" : "FOOBAR",
        "title" : "FOOBAR",
        "tags" : [
          "FOOBAR"
        ]
      }
    }
  },
  "apiVersion" : "v3"
}

Response: status 200
Response headers:
  Alternate-Protocol: 443:quic
  Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  Content-Length: 209
  Content-Type: application/json
  Date: Wed, 04 Dec 2013 09:04:11 GMT
  Expires: Fri, 01 Jan 1990 00:00:00 GMT
  Pragma: no-cache
  Server: HTTP Upload Server Built on Nov 15 2013 16:02:54 (1384560174)

Response body: (209 bytes)
{
  "id" : "gtl_1",
  "error" : {
    "message" : "Unauthorized",
    "code" : -32602,
    "data" : [
      {
        "domain" : "youtube.header",
        "reason" : "youtubeSignupRequired",
        "locationType" : "header",
        "location" : "Authorization",
        "message" : "Unauthorized"
      }
    ]
  }
}
-----------------------------------------------------------

Original comment by [email protected] on 5 Dec 2013 at 12:59

from gtm-oauth2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
I commented out the two assertions so it returns an error instead of crash. 
(just as it would in non-debug build if I understand correctly)

Original comment by [email protected] on 5 Dec 2013 at 1:01

from gtm-oauth2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
The fetcher was written expecting errors as http status codes, but the YouTube 
API is now retuning them as JSON. I'll modify the library to not assert there, 
effectively similar to what you've done.

Incidentally, this issue tracker is intended for the OAuth 2 library, not for 
the GTL library.

Original comment by [email protected] on 5 Dec 2013 at 1:37

  • Changed state: Accepted

from gtm-oauth2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
much appreciated.

Original comment by [email protected] on 5 Dec 2013 at 1:44

from gtm-oauth2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
This should be resolved in the top-of-trunk library. Please update your library 
sources.

https://code.google.com/p/gtm-http-fetcher/source/detail?r=134

Thank you for reporting the issue.

Original comment by [email protected] on 6 Dec 2013 at 11:33

  • Changed state: Fixed

from gtm-oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.