Question: Java internet io POST/GET problem /** * q3: Write a public static method named q3 that takes a String as a parameter and returns *

Java internet io POST/GET problem

/** * q3: Write a public static method named q3 that takes a String as a parameter and returns * an int. This method will first send a POST request to a server with the url * "https://fury.cse.buffalo.edu/ps-api/type-five" where the text in the body of the request * is a CSV formatted string containing the Strings "mean" then the String from the input of * this method (do not include any quotes or spaces in your request String). The response * from the server will be a CSV formatted String with either three or four values that are * well formed ints. Parse these values and send them back to the server in a GET request to * the same url but with a query String with the values from the first server response and * names corresponding to the value positions as "first", "second", "third", or "fourth". For * example, if the POST response is "6,32,1,28" then your query String for the GET request * should be "first=6&second=32&third=1&fourth=28". Finally, return the server's response to * the GET request which will be a well-formed int */

Simplest solutions preferred

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!