It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.





Class CAS_ProxiedService_Http_Post

This class is used to make proxied service requests via the HTTP POST method.

Usage Example:

try { $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST); $service->setUrl(''); $service->setContentType('text/xml'); $service->setBody('<?xml version="1.0"?'.'>'); $service->send(); if ($service->getResponseStatusCode() == 200) return $service->getResponseBody(); else // The service responded with an error code 404, 500, etc. throw new Exception('The service responded with an error.');

} catch (CAS_ProxyTicketException $e) { if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE) return "Your login has timed out. You need to log in again."; else // Other proxy ticket errors are from bad request format // (shouldn't happen) or CAS server failure (unlikely) so lets just // stop if we hit those. throw $e; } catch (CAS_ProxiedService_Exception $e) { // Something prevented the service request from being sent or received. // We didn't even get a valid error response (404, 500, etc), so this // might be caused by a network error or a DNS resolution failure. // We could handle it in some way, but for now we will just stop. throw $e; }

CAS_ProxiedService_Abstract implements CAS_ProxiedService, CAS_ProxiedService_Testable
Extended by CAS_ProxiedService_Http_Abstract implements CAS_ProxiedService_Http
Extended by CAS_ProxiedService_Http_Post
Package: PhpCAS
Category: Authentication
License: Apache License 2.0
Author: Adam Franco
Class: CAS_ProxiedService_Http_Post
Located at shared/cas/source/CAS/ProxiedService/Http/Post.php
Methods summary
# setContentType( string $contentType )

Set the content type of this POST request.

# setBody( string $body )

Set the body of this POST request.

# populateRequest( CAS_Request_RequestInterface $request )

Add any other parts of the request needed by concrete classes

Methods inherited from CAS_ProxiedService_Http_Abstract
__construct(), getCookies(), getRedirectUrl(), getResponseBody(), getResponseHeaders(), getResponseStatusCode(), getServiceUrl(), hasBeenSent(), makeRequest(), send(), setUrl()
Methods inherited from CAS_ProxiedService_Abstract
getProxyTicket(), initializeProxyTicket(), setCasClient(), setProxyTicket()
Properties summary
private string $_contentType

The content-type of this request

private string $_body

The body of the this request

Properties inherited from CAS_ProxiedService_Http_Abstract

© 2004-2022 – Nicola Asuni - - All rights reserved.
about - disclaimer - privacy