package com.chrisdempewolf.pinterest.methods.network;

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.IOException;

public class NetworkHelper {

    public static ResponseMessageAndStatusCode submitDeleteRequest(final HttpDelete httpDelete) throws IOException {
        try (final CloseableHttpResponse response = HttpClients.createDefault().execute(httpDelete)) {
            final String responseBody = EntityUtils.toString(response.getEntity());
            final int statusCode = response.getStatusLine().getStatusCode();

            return new ResponseMessageAndStatusCode(statusCode, responseBody);
        }
    }
}

@@ -159,16 +159,119 @@
 Delete;%0A
+import org.apache.http.client.methods.HttpPost;%0Aimport org.apache.http.client.methods.HttpRequestBase;%0A
 import o
@@ -310,16 +310,16 @@
 lients;%0A
-
 import o
@@ -528,16 +528,345 @@
 ption %7B%0A
+        return submitRequest(httpDelete);%0A    %7D%0A%0A    public static ResponseMessageAndStatusCode submitPostRequest(final HttpPost httpPost) throws IOException %7B%0A        return submitRequest(httpPost);%0A    %7D%0A%0A    private static ResponseMessageAndStatusCode submitRequest(final HttpRequestBase httpRequestBase) throws IOException %7B%0A
         
@@ -949,21 +949,26 @@
 ute(http
-Delet
+RequestBas
 e)) %7B%0A  

Update network helper to include POST requests