I need to modify the HTTP header like this: Please modify your client to use a HTTP header named "X-Auth-Token" with the underneath personal token as value.
Your API token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
this is my code:
String image = "";
String name = "";
String position = "";
void setup() {
size(800, 860);
textSize(20);
}
void draw() {
getInfo();
background(0);
text(name,10,820);
text(position,10,850);
}
}
}
void getInfo() {
try {
JSONObject info = loadJSONObject("http:" + "//api.football-data.org/v1/teams/66/players");
name = info.getString("name");
position = info.getString("position");
}
catch (Exception e) {
println("rats... " + e);
}
}
Can someone please help me? (I'm new to processing)