/auth
Usage and SDK Samples
curl --location --request POST 'https://yemenexam.com/ws/auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'pass=' \
--data-urlencode 'user='
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://yemenexam.com/ws/auth")
.header("Content-Type", "application/x-www-form-urlencoded")
.field("pass", "")
.field("user", "")
.asString();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "pass=&user=");
Request request = new Request.Builder()
.url("https://yemenexam.com/ws/auth")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
#import
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://yemenexam.com/ws/auth"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Type": @"application/x-www-form-urlencoded"
};
[request setAllHTTPHeaderFields:headers];
NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"pass=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&user=" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("pass", "");
urlencoded.append("user", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://yemenexam.com/ws/auth", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var client = new RestClient("https://yemenexam.com/ws/auth");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("pass", "");
request.AddParameter("user", "");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://yemenexam.com/ws/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "pass=%3Cstring%3E&user=%3Cstring%3E",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://yemenexam.com/ws/auth');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append(new http\QueryString(array(
'pass' => '',
'user' => '')));$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'Content-Type' => 'application/x-www-form-urlencoded'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
import http.client
import mimetypes
conn = http.client.HTTPSConnection("https://yemenexam.com/ws")
payload = 'pass=%3Cstring%3E&user=%3Cstring%3E'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/auth", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Parameters
Form parameters
Name | Description |
---|---|
user* |
String
Required
|
pass* |
String
Required
|