•   about 5 years ago

Problems with web API /receive endpoint

Not sure if anyone else has encountered this but I seem to be having problems with the /receive endpoint from a java client. When I do a simple curl with the cookie and this URL: https://send-anywhere.com/web/v1/key/{KEY}, it always returns a value but there is some noticable delay. I did a debug with my Java clients and am consistently seeing a 404. I am pasting the raw HTTP debug logs below. I have used the following Java clients so far:

1. Spring restTemplate with default settings
2. Spring restTemplate using Apache Commons HTTP lib

With (1) I get a timeout error within the response (increasing the timeout doesnt help), with (2) I am consistently seeing a 404. I am going to directly try and use Http commons client without Spring restTemplate and see if that changes anything.

Thanks
Ahmed

DEBUG o.a.h.wire - http-outgoing-1 >> "GET /web/v1/078138 HTTP/1.1[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 >> "Accept: application/json, application/*+json[\r][\n]"
DEBUG o.s.w.c.RestTemplate - Created GET request for "https://send-anywhere.com/web/v1/539158"
DEBUG o.a.h.wire - http-outgoing-2 >> "GET /web/v1/key HTTP/1.1[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 >> "Cookie: device_key=e1d8e64261fcfa8de66b4ce395713b3313e77d398f13cf4fad78985896225f8a[\r][\n]"
DEBUG o.s.w.c.RestTemplate - Created GET request for "https://send-anywhere.com/web/v1/618016"
DEBUG o.a.h.wire - http-outgoing-2 >> "Accept: application/json, application/*+json[\r][\n]"
DEBUG o.s.w.c.RestTemplate - Setting request Accept header to [application/json, application/*+json]
DEBUG o.a.h.wire - http-outgoing-1 >> "Host: send-anywhere.com[\r][\n]"
DEBUG o.s.w.c.RestTemplate - Setting request Accept header to [application/json, application/*+json]
DEBUG o.a.h.wire - http-outgoing-2 >> "Cookie: device_key=32e39fdce3f11be32aba6652e17b30c4085ccde89418ea695a5523c7dab718da[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-2 >> "Host: send-anywhere.com[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 >> "User-Agent: Apache-HttpClient/4.3.6 (Java 1.5 minimum; Java/1.8.0_25)[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 >> "[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.3.6 (Java 1.5 minimum; Java/1.8.0_25)[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-2 >> "[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "HTTP/1.1 404 Not Found[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Content-Type: text/html; charset=utf-8[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Date: Fri, 07 Aug 2015 14:46:50 GMT[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "ETag: "-1854165814"[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Server: nginx/1.8.0[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Set-Cookie: i18next=en; path=/; expires=Sun, 07 Aug 2016 14:46:50 GMT[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "X-Powered-By: Express[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Content-Length: 3972[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "Connection: keep-alive[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "[\r][\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << " Send Anywhere try{Typekit.load();}catch(e){}[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');[\n]"
DEBUG o.a.h.wire - http-outgoing-1 << "[\n]"

Comments are closed.