I am trying to write a client using the
nova.astrometry.net API in C#.NET.
Authentication works well, I can easily obtain session ID for my API key.
However when I want to
upload an image using the
/api/upload endpoint described
here, the server response is following:
HTTP/1.1 200 OK
Date: Wed, 23 Oct 2019 09:36:28 GMT
Server: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12
Content-Length: 46
Access-Control-Allow-Origin: *
Content-Type: text/plain; charset=UTF-8
{"status": "error", "errormessage": "no json"}
My
request (also attached as a text file) is following:
POST http://nova.astrometry.net/api/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------0b386c5a-e33a-4db4-bbd9-a5229090ccee
Host: nova.astrometry.net
Content-Length: 781078
Expect: 100-continue
-----------------------------0b386c5a-e33a-4db4-bbd9-a5229090ccee
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="request - json"
{"allow_commercial_use": "d", "allow_modifications": "d", "publicly_visible": "y", "session": "0gihhfytvh1o7ajf1rrt55ynhha38y22"}
-----------------------------0b386c5a-e33a-4db4-bbd9-a5229090ccee
Content-Type: application/octet-stream
MIME-Version: 1.0
Content-disposition: form-data; name="file"; filename="66011311_10214710726185818_2918331987305431040_o.jpg"
<ISO-8859-1 ENCODED JPEG FILE CONTENT>
-----------------------------0b386c5a-e33a-4db4-bbd9-a5229090ccee--
Any idea, why I am receiving
Error - No JSON in the response?
BR,
Ladislav