putExternalMirrorQuery: putExternalMirror's Query Sign Way
@link https://docs.qingcloud.com/qingstor/api/bucket/external_mirror/put_external_mirror.html Documentation URL
@param string 'source_site' Source site url

@return Request
10167
public function putExternalMirrorQuery($expires, $options=array())
    {
        $req = $this->putExternalMirrorRequest($options);
        return $req->query_sign($expires);
    }
346691
public function setAliasLockedTargetUseURI(string $alias_locked_target_use_uri = "N") : CNabuDataObject
    {
        if ($alias_locked_target_use_uri === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$alias_locked_target_use_uri")
            );
        }
        $this->setValue('nb_site_alias_locked_target_use_uri', $alias_locked_target_use_uri);
        
        return $this;
    }
639272
public function createAbsoluteUrl($uri, $query_params = [], $ssl = false, $port = 80, $request = null)
    {
        if ($this->isSingle()) {
            return UrlManager::createAbsoluteUrl($uri, $query_params, $ssl, $port, $request);
        }
        return '';
    }
1299609
public function replicate($source, $target, $cancel = null, $continuous = null, $filter = null, array $ids = null, $proxy = null)
    {
        $params = ['target' => $target, 'source' => $source];
        if ($cancel !== null) {
            $params['cancel'] = (bool) $cancel;
        }
        if ($continuous !== null) {
            $params['continuous'] = (bool) $continuous;
        }
        if ($filter !== null) {
            $params['filter'] = $filter;
        }
        if ($ids !== null) {
            $params['doc_ids'] = $ids;
        }
        if ($proxy !== null) {
            $params['proxy'] = $proxy;
        }
        $path = '/_replicate';
        $response = $this->httpClient->request('POST', $path, json_encode($params));
        if ($response->status >= 400) {
            throw HTTPException::fromResponse($path, $response);
        }

        return $response->body;
    }
648648
function(source, callback) {
        var url = this.getSignedResourceUrl('POST', this.getImagesUrl()),
            isFile = isBrowser && source instanceof window.File,
            onComplete = callback.onComplete || callback,
            onProgress = callback.onProgress || null;

        request({
            method: 'POST',
            uri: url,
            body: source,
            headers: {
                'Accept': 'application/json',
                'User-Agent': 'imboclient-js',
                'Content-Length': isFile ? source.size : source.length
            },
            onComplete: function(err, res, body) {
                body = jsonparse(body);
                onComplete(err, body ? body.imageIdentifier : null, body, res);
            },
            onProgress: onProgress
        });

        return this;
    }
123898
public static HttpServletResponse getHttpServletResponseFromExternalWebflowContext() {
        val servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext();
        if (servletExternalContext != null) {
            return (HttpServletResponse) servletExternalContext.getNativeResponse();
        }
        return null;
    }
1131842
@PUT
    public Response putContent(@PathParam("spaceID") String spaceID,
                               @PathParam("contentID") String contentID,
                               @QueryParam("storeID") String storeID,
                               @HeaderParam(COPY_SOURCE_HEADER) String copySource,
                               @HeaderParam(COPY_SOURCE_STORE_HEADER) String sourceStoreID) {
        if (null != copySource) {
            return copyContent(spaceID, contentID, storeID, sourceStoreID, copySource);

        } else {
            return addContent(spaceID, contentID, storeID);
        }
    }
559379
public function redirect($url, $externalUrl=FALSE) {
	
		// stores enqueued messages for next retrievement
		$this->makeQueuedMessagesPersistent();
		
		if (!$url) return;
		
		// external redirect
		if ($externalUrl) {
			
			header('Location: ' . $url);
			
		// redirect to internal path
		} else {
			
			$router = Router::getInstance();
			$page  = $router->getPage();
			
			if ($page > 1) {
				
				// removes a possible leading slash
				if ('/'==$url{0}) {
					$url = substr($url,1);
				}
				
				// if url contains just module, create a fake action placeholder
				if (FALSE == strpos($url, '/')) {
					$url .= '/';
				}
				
				header('Location: ' . BASE_HREF . $url . '/page-' . $page);
				
			} else {
				
				header('Location: ' . BASE_HREF . $url);
				
			}
				
		}
	
		exit();

	}
1267781
public static function search_cohorts_parameters() {
        $query = new external_value(
            PARAM_RAW,
            'Query string'
        );
        $includes = new external_value(
            PARAM_ALPHA,
            'What other contexts to fetch the frameworks from. (all, parents, self)',
            VALUE_DEFAULT,
            'parents'
        );
        $limitfrom = new external_value(
            PARAM_INT,
            'limitfrom we are fetching the records from',
            VALUE_DEFAULT,
            0
        );
        $limitnum = new external_value(
            PARAM_INT,
            'Number of records to fetch',
            VALUE_DEFAULT,
            25
        );
        return new external_function_parameters(array(
            'query' => $query,
            'context' => self::get_context_parameters(),
            'includes' => $includes,
            'limitfrom' => $limitfrom,
            'limitnum' => $limitnum
        ));
    }
1059681
func (s *Bucket) PutExternalMirrorRequest(input *PutBucketExternalMirrorInput) (*request.Request, *PutBucketExternalMirrorOutput, error) {

	if input == nil {
		input = &PutBucketExternalMirrorInput{}
	}

	properties := *s.Properties

	o := &data.Operation{
		Config:        s.Config,
		Properties:    &properties,
		APIName:       "PUT Bucket External Mirror",
		RequestMethod: "PUT",
		RequestURI:    "/<bucket-name>?mirror",
		StatusCodes: []int{
			200, // OK
		},
	}

	x := &PutBucketExternalMirrorOutput{}
	r, err := request.New(o, input, x)
	if err != nil {
		return nil, nil, err
	}

	return r, x, nil
}
574697
public static function get_random_question_summaries_parameters() {
        return new external_function_parameters([
                'categoryid' => new external_value(PARAM_INT, 'Category id to find random questions'),
                'includesubcategories' => new external_value(PARAM_BOOL, 'Include the subcategories in the search'),
                'tagids' => new external_multiple_structure(
                    new external_value(PARAM_INT, 'Tag id')
                ),
                'contextid' => new external_value(PARAM_INT,
                    'Context id that the questions will be rendered in (used for exporting)'),
                'limit' => new external_value(PARAM_INT, 'Maximum number of results to return',
                    VALUE_DEFAULT, 0),
                'offset' => new external_value(PARAM_INT, 'Number of items to skip from the begging of the result set',
                    VALUE_DEFAULT, 0)
        ]);
    }
1011720
public function setLoginRedirectionTargetUseURI($login_redirection_target_use_uri) : CNabuDataObject
    {
        if ($login_redirection_target_use_uri === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$login_redirection_target_use_uri")
            );
        }
        $this->setValue('nb_site_role_login_redirection_target_use_uri', $login_redirection_target_use_uri);
        
        return $this;
    }
212991
public function toUrl(N2nContext $n2nContext, ControllerContext $controllerContext = null, 
			string &$suggestedLabel = null): Url {
		
		if ($this->type == self::TYPE_EXTERNAL) {
			$suggestedLabel = $this->label;
			return Url::create($this->url);
		}
		
		$url = MurlPage::obj($this->linkedPage)->toUrl($n2nContext, $controllerContext, $suggestedLabel);
		if ($this->label !== null) {
			$suggestedLabel = $this->label;
		}
		
		return $url;
	}
464040
public function GetToBasketLinkForExternalCalls()
    {
        return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id);
    }
1211414
function put($http_method = null, $ext = null) {
        static::$icons[$this->getAs()] = $this->getIcon();
        \Route::group([
            'middleware' => $this->getMiddleware(),
            'domain'     => $this->getDomain(),
            'prefix'     => $this->getPrefix(),
        ], function () use ($http_method, $ext) {
            $method = self::normalizeMethod($http_method);
            /** @var $route \Illuminate\Routing\Route */
            $route = \Route::$method($this->getUrl() . ($ext ? '.' . $ext : ''), [
                'as'   => $this->getAs(),
                'uses' => $this->getUses(),
            ]);
            if(count($this->getPatterns())) {
                $route->where($this->getPatterns());
            }
        });

        $this->action = null;
        $this->icon   = null;

        return $this;
    }
413364
private function request($method, $uri, $body = array())
    {
        try {
            $res = $this->client->sendRequest($method, $uri, $body);
            return json_decode($res->getBody(), true);
        } catch(FacebookSDKException $e){
            /*
             * If the session expired, then we must request a new token with the
             * refresh token.
             */
//            if($e->getCode() == '190'){
//                $this->refreshToken($method, $uri, $body);
//            } else {
                throw new ExternalApiException($e->getMessage(), $e->getCode(), $e);
//            }
        }
    }
183736
public function addExternalReferenceMissingError(RestResponseInterface $restResponse): RestResponseInterface
    {
        $restErrorTransfer = (new RestErrorMessageTransfer())
            ->setCode(CompanyBusinessUnitsRestApiConfig::RESPONSE_CODE_EXTERNAL_REFERENCE_MISSING)
            ->setStatus(Response::HTTP_BAD_REQUEST)
            ->setDetail(CompanyBusinessUnitsRestApiConfig::RESPONSE_DETAILS_EXTERNAL_REFERENCE_MISSING);

        return $restResponse->addError($restErrorTransfer);
    }