Skip to content

Instantly share code, notes, and snippets.

@theawesomenayak
Created October 18, 2020 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theawesomenayak/0c069910f066e7544d6e2c8419edcf5f to your computer and use it in GitHub Desktop.
Save theawesomenayak/0c069910f066e7544d6e2c8419edcf5f to your computer and use it in GitHub Desktop.
try {
final String output = getNewsFromGoogle();
return response.withStatusCode(200).withBody(output);
} catch (final IOException | InterruptedException | XMLStreamException e) {
return response.withBody("{}").withStatusCode(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment