CURL zuwa Java OkHttp akan layi
Wannan kayan aikin yana taimaka muku ƙirƙirar lambar Java OkHttp bisa umurnin CURL. Kwafi da Manna Umurnin CURL kuma Samar da Java OkHttp.
Me zaku iya yi da CURL zuwa Java OkHttp Converter Online?
- CURL zuwa Java OkHttp kayan aiki ne na musamman don canza umarnin cURL zuwa buƙatar Java OkHttp na Java OkHttp. Shigar da shigarwar ta hanyar umarnin cURL na mai amfani don samar da lambar Java OkHttp.
- Wannan kayan aikin yana adana lokacin ku kuma yana taimakawa ƙirƙirar lambar Java OkHttp cikin sauƙi.
- CURL zuwa Java OkHttp yana aiki da kyau akan Windows, MAC, Linux, Chrome, Firefox, Edge da Safari.
menene CURL?
cURL kayan aikin layin umarni ne mai buɗewa wanda ke zazzage fayiloli daga gidan yanar gizo. Yana goyan bayan ka'idoji iri-iri, gami da Java OkHttp, Java OkHttpS, FTP, SFTP, TFTP, Gopher da sauransu.
Ta yaya ake canza CURL zuwa lambar Java OkHttp?
Mataki 1: Manna kuma canza buƙatun CURL ɗin ku zuwa lambar Java OkHttp
Mataki 2: Kwafi Java OkHttp code
Canza CURL zuwa Java OkHttp misali
CURL
curl example.com
Java OkHttp Code
import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("http://example.com")
.build();
try (Response response = client.newCall(request).execute()) {
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
response.body().string();
}