Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@faizann
Copy link

@faizann faizann commented Dec 10, 2015

Modified service class to support DELETE request as it was being ignored. That was a bug.
Rest is just all verify related stuff

@marcelcorso
Copy link
Contributor

I was jut trying to compile the examples folder

cd ~/projects/java-rest-api/examples
mvn install

and got this error:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/vagrant/projects/java-rest-api/examples/src/main/java/ExampleVerifyToken.java:[46,11] exception java.io.UnsupportedEncodingException is never thrown in body of corresponding try statement
[INFO] 1 error
[INFO] -------------------------------------------------------------

and it looks correct.

my env

vagrant@vagrant-ubuntu-trusty-64:~/projects/java-rest-api/examples$ java -version
java version "1.7.0_91"
OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
vagrant@vagrant-ubuntu-trusty-64:~/projects/java-rest-api/examples$

@marcelcorso
Copy link
Contributor

I sent the verify token

vagrant@vagrant-ubuntu-trusty-64:~/projects/java-rest-api/examples/target$ java -cp examples-1.0.1-jar-with-dependencies.jar ExampleSendVerifyToken live_lalalalalal 31624971134 "plz test, dude"
sending verify token request:
Verify { id=88fa7b7255694f89aaac815v11946352 href=https://rest.messagebird.com/verify/88fa7b7255694f89aaac815v11946352 recipient=31624971134 messages=Messages{href=https://rest.messagebird.com/messages/ee15198255694f89aae2923b79525268} status=sent createdDatetime=Tue Jan 12 12:59:06 UTC 2016 validUntilDatetime=Tue Jan 12 13:01:06 UTC 2016 }

then when I tried to verify


vagrant@vagrant-ubuntu-trusty-64:~/projects/java-rest-api/examples/target$ java -cp examples-1.0.1-jar-with-dependencies.jar ExampleVerifyToken live_lalalalalal 31624971134 196974
verifying token request: 196974
Exception in thread "main" java.lang.IllegalArgumentException: Illegal character(s) in message header field: Content-Type:
    at sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:465)
    at sun.net.www.protocol.http.HttpURLConnection.isExternalMessageHeaderAllowed(HttpURLConnection.java:435)
    at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:2767)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestProperty(HttpsURLConnectionImpl.java:316)
    at com.messagebird.MessageBirdServiceImpl.getConnection(MessageBirdServiceImpl.java:193)
    at com.messagebird.MessageBirdServiceImpl.getJsonData(MessageBirdServiceImpl.java:111)
    at com.messagebird.MessageBirdServiceImpl.requestByID(MessageBirdServiceImpl.java:73)
    at com.messagebird.MessageBirdClient.verifyToken(MessageBirdClient.java:357)
    at ExampleVerifyToken.main(ExampleVerifyToken.java:30)
vagrant@vagrant-ubuntu-trusty-64:~/projects/java-rest-api/examples/target$

It was throwing an error for some versions of Java. I don't know which or how, but at least it's correct now.
samwierema added a commit that referenced this pull request Jan 12, 2016
Add support for the Verify API
@samwierema samwierema merged commit 1e990ec into master Jan 12, 2016
@samwierema samwierema deleted the verify-api branch January 12, 2016 15:50
denizkilic pushed a commit that referenced this pull request Jan 14, 2020
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

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.