Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API error - JSON file not found or failed to parse #16

Closed
theon opened this issue Mar 10, 2013 · 1 comment
Closed

API error - JSON file not found or failed to parse #16

theon opened this issue Mar 10, 2013 · 1 comment

Comments

@theon
Copy link

theon commented Mar 10, 2013

Hi there,

I'm trying to try out the coverall API manually before I look at using it in a project, however I keep getting the following error JSON file not found or failed to parse.. Could you have a quick look at the below request and response I'm getting below and provide any suggestions as to what I'm doing wrong:

Request

POST https://coveralls.io/api/v1/jobs

Accept: */*
Content-Type: multipart/form-data; boundary=AaB03x
Content-Length: 416
Accept-Language: en-us
Accept-Encoding: gzip, deflate

--AaB03x
Content-Disposition: form-data; name="json_file"
Content-Type: application/json

{
  "repo_token": "my_token",
  "source_files": [
    {
      "name": "example.rb",
      "source": "def four\n  4\nend",
      "coverage": [null, 1, null]
    },
    {
      "name": "two.rb",
      "source": "def seven\n  eight\n  nine\nend",
      "coverage": [null, 1, 0, null]
    }
  ]
}
--AaB03x

Response

HTTP 200 No Error

Content-Type: application/json; charset=utf-8
X-Runtime: 0.211387
Transfer-Encoding: Identity
X-XHR-Current-Location: /api/v1/jobs
X-Rack-Cache: invalidate, pass
Date: Sun, 10 Mar 2013 16:32:32 GMT
X-Request-Id: 5b1e40c682ae86aa472291bc366137e2
Strict-Transport-Security: max-age=31536000
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
X-Ua-Compatible: IE=Edge,chrome=1
Status: 200 OK
Etag: "61a493022ca43f85270e42bcbb96bd94"

{
  "message" : "JSON file not found or failed to parse.",
  "error" : true,
  "url" : ""
}
@theon
Copy link
Author

theon commented Mar 10, 2013

I managed to successfully send the API request manually by just using an HTML form. Inspecting the request that sends, I can't see what was different to what I was sending before. Anyway - I'll close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant