Skip to content

Instantly share code, notes, and snippets.

@phpmaps
Created December 17, 2018 23:36
Show Gist options
  • Select an option

  • Save phpmaps/88c55c532af4ca3fcc9b74ec36c0a59e to your computer and use it in GitHub Desktop.

Select an option

Save phpmaps/88c55c532af4ca3fcc9b74ec36c0a59e to your computer and use it in GitHub Desktop.
bodyBuilder
public List<NameValuePair> bodyBuilder(Map<String, String> map) {
List<NameValuePair> paramList = new ArrayList<>(map.size());
for (Map.Entry<String, String> entry : map.entrySet()) {
paramList.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
}
return paramList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment