4

How do I get a specific header using the Ion network library for Android?

This is what I'm trying:

...
.setCallback(new FutureCallback<Response<String>>() {
    @Override
    public void onCompleted(Exception e, Response<String> result) {
        System.out.println("header: " + result.getHeaders().message("mykey"));
    }
});
Andrew
  • 3,545
  • 4
  • 31
  • 37

1 Answers1

1

message(String) sets the HTTP response message. I should make that internal to avoid confusion.

Use

getHeaders().getHeaders().get(String)

It's a bit obtuse at the moment, will need to clean that API up in the next release.

koush
  • 2,972
  • 28
  • 31