0

I want to make use of the Mailjet's API to get and post some information to Mailjet.

This is done via HTTP GET and POST request.

And example to get some information for a specific emailaddress is here:

https://eu.mailjet.com/docs/api/contact/infos

How can I invoke that from within a Java web app and get the array of information in Java?

Joël Craenhals
  • 475
  • 7
  • 19

2 Answers2

1

I found the solution.

I used the Apache HttpComponents library.

Joël Craenhals
  • 475
  • 7
  • 19
1

In case this comes up in similar searches, we have a Java wrapper to help here:

https://github.com/mailjet/mailjet-apiv3-java

All the best.

Toby.

Swooop
  • 21
  • 3
  • 1
    That api sucks dude. Overengineered and not even done right. API programmed against cocrete types instead of interfaces etc. etc., a fluent API for call creation that sux. OMG! Please refactor it completely. – Falcon Oct 29 '15 at 11:15
  • Sorry to hear that. Would love to hear more about what caused you troubles with our API. Please reach us at api@mailjet.com so we can continue this discussion in more details. – arnaud.breton Oct 30 '15 at 13:01
  • 1
    @arnaud.breton It seems like the API is heavily focussed on the technical interface rather than the business meaning of the interface. I see no proper domain objects that interact and encapsulate domain logic. Rather, you have added complexity by creating an overly generic solution that only seems clever. It only "seems" clever because you gain no better extensibility at all (what was likely the purpose). Moreover, you have programmed against concrete types: Nowhere can I pass a Map, no, it must always be a HashMap or an ArrayList. – Falcon Nov 02 '15 at 16:25
  • Thanks @Falcon for all the feedback, appreciated. I would love to continue the discussion over email so we can go through your use-cases and understand what is going wrong for you here. Also, we're working on a new iteration of our Java wrapper, solving lots of issues developers are facing using the current one. Best. – arnaud.breton Nov 03 '15 at 19:03