Class Http

java.lang.Object
dd2480.group4.net.Http
All Implemented Interfaces:
HttpInterface

public class Http
extends java.lang.Object
implements HttpInterface
Http requests used to update commit status on GitHub
  • Constructor Summary

    Constructors 
    Constructor Description
    Http()  
  • Method Summary

    Modifier and Type Method Description
    java.net.HttpURLConnection post​(java.net.URL url, java.lang.String json)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Http

      public Http()
  • Method Details

    • post

      public java.net.HttpURLConnection post​(java.net.URL url, java.lang.String json) throws java.io.IOException
      Specified by:
      post in interface HttpInterface
      Parameters:
      url - The endpoint to send the POST request to
      json - The body in the request in json format
      Returns:
      Returns a HttpURLConnection with the given URL ready to send the JSON.
      Throws:
      java.io.IOException - when it fails to send the message.