PageRenderTime 712ms queryTime 40ms sortTime 17ms getByIdsTime 570ms findMatchingLines 26ms

100+ results results for 'httpcode' (712 ms)

Not the results you expected?
MediaFileUpload.php https://github.com/ShinichiU/opCalendarPlugin.git | PHP | 300 lines
                    
163    $response->setExpectedClass($this->request->getExpectedClass());
                    
164    $code = $response->getResponseHttpCode();
                    
165    $this->httpResultCode = $code;
                    
280    $location = $response->getResponseHeader('location');
                    
281    $code = $response->getResponseHttpCode();
                    
282
                    
                
IoTest.php https://gitlab.com/oytunistrator/google-api-php-client | PHP | 381 lines
                    
143    $req->setResponseBody('{"a": "foo"}');
                    
144    $req->setResponseHttpCode(200);
                    
145    $req->setResponseHeaders(
                    
197    $this->assertEquals('{"a": "foo"}', $res->getResponseBody());
                    
198    $this->assertEquals(200, $res->getResponseHttpCode());
                    
199    $this->assertEquals(
                    
236    $cacheReq->setResponseBody("{\"a\": \"foo\"}");
                    
237    $cacheReq->setResponseHttpCode(200);
                    
238    $cacheReq->setResponseHeaders(
                    
253    $this->assertEquals("{\"a\": \"foo\"}", $res->getResponseBody());
                    
254    $this->assertEquals(200, $res->getResponseHttpCode());
                    
255  }
                    
269    $cacheReq->setResponseBody("{\"a\": \"foo\"}");
                    
270    $cacheReq->setResponseHttpCode(200);
                    
271    $cacheReq->setResponseHeaders(
                    
                
helpers.js https://github.com/OpenNebula/one.git | JavaScript | 295 lines
                    
27} = require('server/utils/server')
                    
28const { defaults, httpCodes } = require('server/utils/constants')
                    
29const {
                    
41} = defaults
                    
42const { ok, internalServerError } = httpCodes
                    
43const relName = 'provision-mapping'
                    
                
Exceptions.cs https://bitbucket.org/bestter/hdlg | C# | 176 lines
                    
108
                    
109                        writer.WriteLine(string.Format("HTTP error code: {0}", heExc.GetHttpCode()));
                    
110                        writer.WriteLine(string.Format("HRESULT: {0}", heExc.ErrorCode));
                    
                
IoTest.php https://github.com/ShinichiU/opCalendarPlugin.git | PHP | 307 lines
                    
162    $cacheReq->setResponseBody("{\"a\": \"foo\"}");
                    
163    $cacheReq->setResponseHttpCode(200);
                    
164    $cacheReq->setResponseHeaders(
                    
179    $this->assertEquals("{\"a\": \"foo\"}", $res->getResponseBody());
                    
180    $this->assertEquals(200, $res->getResponseHttpCode());
                    
181  }
                    
195    $cacheReq->setResponseBody("{\"a\": \"foo\"}");
                    
196    $cacheReq->setResponseHttpCode(200);
                    
197    $cacheReq->setResponseHeaders(
                    
                
wbloc.c git://github.com/MartinProkop/MojeWebarchivBakalarskaPrace.git | C | 322 lines
                    
192
                    
193WPUBLIC const warc_u8_t * WBloc_getHttpCode (const void * const _self)
                    
194{
                    
                
HttpResponse.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 235 lines
                    
81        }
                    
82        $httpCodeSent = false;
                    
83        foreach ($this->_headers as $header) {
                    
83        foreach ($this->_headers as $header) {
                    
84            if (!$httpCodeSent && $this->_httpResponseCode) {
                    
85                header($header['name'] . ': ' . $header['value'], $header['replace'], $this->_httpResponseCode);
                    
85                header($header['name'] . ': ' . $header['value'], $header['replace'], $this->_httpResponseCode);
                    
86                $httpCodeSent = true;
                    
87            } else {
                    
90        }
                    
91        if (!$httpCodeSent) {
                    
92            header('HTTP/1.1 ' . $this->_httpResponseCode);
                    
92            header('HTTP/1.1 ' . $this->_httpResponseCode);
                    
93            $httpCodeSent = true;
                    
94        }
                    
                
Google_HttpRequest.php https://bitbucket.org/reareaf/wp-re.git | PHP | 304 lines
                    
19 * HTTP Request to be executed by apiIO classes. Upon execution, the
                    
20 * responseHttpCode, responseHeaders and responseBody will be filled in.
                    
21 *
                    
40
                    
41  protected $responseHttpCode;
                    
42  protected $responseHeaders;
                    
91   */
                    
92  public function getResponseHttpCode() {
                    
93    return (int) $this->responseHttpCode;
                    
96  /**
                    
97   * @param int $responseHttpCode HTTP Response Code.
                    
98   */
                    
98   */
                    
99  public function setResponseHttpCode($responseHttpCode) {
                    
100    $this->responseHttpCode = $responseHttpCode;
                    
                
getinfo.c https://github.com/LeifAndersen/Android-Supertux.git | C | 273 lines
                    
57
                    
58  info->httpcode = 0;
                    
59  info->httpversion=0;
                    
127  case CURLINFO_RESPONSE_CODE:
                    
128    *param_longp = data->info.httpcode;
                    
129    break;
                    
                
Authority.cs http://mikeamundsen.googlecode.com/svn/trunk/ | C# | 261 lines
                    
83        ctx.Response.ContentType = "text/xml";
                    
84        ctx.Response.Write(string.Format(CultureInfo.CurrentCulture, Constants.ErrorFormat, hex.GetHttpCode(), hex.Message, Constants.SitkaNS));
                    
85        ctx.Response.Write(" ".PadRight(500));
                    
85        ctx.Response.Write(" ".PadRight(500));
                    
86        ctx.Response.StatusCode = hex.GetHttpCode();
                    
87        ctx.Response.StatusDescription = hex.Message;
                    
                
WhitelistAPI.java https://gitlab.com/jslee1/OpenID-Connect-Java-Spring-Server | Java | 211 lines
                    
26import org.mitre.openid.connect.service.WhitelistedSiteService;
                    
27import org.mitre.openid.connect.view.HttpCodeView;
                    
28import org.mitre.openid.connect.view.JsonEntityView;
                    
104			logger.error("addNewWhitelistedSite failed due to JsonParseException", e);
                    
105			m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
                    
106			m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a JSON syntax exception. Contact a system administrator for assistance.");
                    
109			logger.error("addNewWhitelistedSite failed due to IllegalStateException", e);
                    
110			m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
                    
111			m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered an IllegalStateException. Refresh and try again - if the problem persists, contact a system administrator for assistance.");
                    
141			logger.error("updateWhitelistedSite failed due to JsonParseException", e);
                    
142			m.put(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
                    
143			m.put(JsonErrorView.ERROR_MESSAGE, "Could not update whitelisted site. The server encountered a JSON syntax exception. Contact a system administrator for assistance.");
                    
146			logger.error("updateWhitelistedSite failed due to IllegalStateException", e);
                    
147			m.put(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
                    
148			m.put(JsonErrorView.ERROR_MESSAGE, "Could not update whitelisted site. The server encountered an IllegalStateException. Refresh and try again - if the problem persists, contact a system administrator for assistance.");
                    
                
EndToEndSpec.scala https://gitlab.com/github-cloud-corp/finagle | Scala | 324 lines
                    
110              val pipeline = Channels.pipeline()
                    
111              pipeline.addLast("httpCodec", new HttpClientCodec)
                    
112              pipeline.addLast("recvd", new ChannelUpstreamHandler {
                    
                
upload-req.js https://bitbucket.org/hankei6km/tsubumoca | JavaScript | 284 lines
                    
92		this.uploadRequestFailure(params, {
                    
93			httpCode: this.err.timeOutError.status,
                    
94			responseString: this.err.timeOutError.text
                    
112		if (resp.completed) {
                    
113			if (resp.completionCode == 0 && resp.httpCode == 200) {
                    
114				params.onSuccess({
                    
114				params.onSuccess({
                    
115					status: resp.httpCode,
                    
116					responseText: resp.responseString
                    
118				params.uploadComplete({
                    
119					status: resp.httpCode,
                    
120					responseText: resp.responseString
                    
121				});//完了したのでonComplete実行
                    
122			} else if (resp.httpCode == 0) {
                    
123				//resp.completionCodeが0以外でもresp.httpCodeが0ならおそらくキャンセルなどと思われるのでfailureにはしない
                    
                
remotefilegetter.php https://gitlab.com/inglobe/mgt-clemente-css | PHP | 348 lines
                    
199            /* Check for 404 (file not found). */
                    
200            $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
201            $exists = ($httpCode < 400);
                    
203
                    
204            if ($httpCode == 503 or $httpCode == 403) {
                    
205                /* wait for a half second */
                    
207                $response = curl_exec($ch);
                    
208                $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
209                $exists = ($httpCode < 400);
                    
287            if ($proto=='http' || $proto=='https') {
                    
288                $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
289                $ok = ($httpCode < 400);
                    
                
Run.php https://gitlab.com/madwanz64/laravel | PHP | 545 lines
                    
38     */
                    
39    private $sendHttpCode    = 500;
                    
40
                    
272     */
                    
273    public function sendHttpCode($code = null)
                    
274    {
                    
275        if (func_num_args() == 0) {
                    
276            return $this->sendHttpCode;
                    
277        }
                    
279        if (!$code) {
                    
280            return $this->sendHttpCode = false;
                    
281        }
                    
292
                    
293        return $this->sendHttpCode = $code;
                    
294    }
                    
                
MediaFileUpload.php https://gitlab.com/bhargavi_dcw/dflocal | PHP | 315 lines
                    
188        $response->setExpectedClass($this->request->getExpectedClass());
                    
189        $code = $response->getResponseHttpCode();
                    
190        $this->httpResultCode = $code;
                    
297        $location = $response->getResponseHeader('location');
                    
298        $code = $response->getResponseHttpCode();
                    
299        if (200 == $code && true == $location) {
                    
                
ochttp.c https://bitbucket.org/vijaysm/libmesh.git | C | 334 lines
                    
23long
                    
24ocfetchhttpcode(CURL* curl)
                    
25{
                    
25{
                    
26    long httpcode;
                    
27    CURLcode cstat = CURLE_OK;
                    
28    /* Extract the http code */
                    
29    cstat = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE,&httpcode);
                    
30    if(cstat != CURLE_OK) httpcode = 0;
                    
30    if(cstat != CURLE_OK) httpcode = 0;
                    
31    return httpcode;
                    
32}
                    
                
proxy.go https://gitlab.com/hasura/kubernetes | Go | 268 lines
                    
57	var apiResource string
                    
58	var httpCode int
                    
59	reqStart := time.Now()
                    
59	reqStart := time.Now()
                    
60	defer metrics.Monitor(&verb, &apiResource, net.GetHTTPClient(req), httpCode, reqStart)
                    
61
                    
64		notFound(w, req)
                    
65		httpCode = http.StatusNotFound
                    
66		return
                    
77		notFound(w, req)
                    
78		httpCode = http.StatusNotFound
                    
79		return
                    
96		notFound(w, req)
                    
97		httpCode = http.StatusNotFound
                    
98		return
                    
                
error.py https://github.com/GLab/ToMaTo.git | Python | 288 lines
                    
56
                    
57	def __init__(self, code=None, message=None, data=None, type=None, todump=None, module=MODULE, httpcode=None, onscreenmessage=None, frame=None, frame_trace=None, trace=None, wasdumped=False):
                    
58		self.type = type or self.TYPE
                    
67			self.trace = trace
                    
68		if httpcode is None:
                    
69			self.httpcode = getCodeHTTPErrorCode(code)
                    
70		else:
                    
71			self.httpcode = httpcode
                    
72		if onscreenmessage is None:
                    
                
SQLDBPersistenceManager_ResolveReference.cs https://github.com/mbmccormick/Ximura.git | C# | 198 lines
                    
112            {
                    
113                context.Response.Status = CH.HTTPCodes.InternalServerError_500;
                    
114                context.Response.Substatus = nrefex.Message;
                    
117            {
                    
118                context.Response.Status = CH.HTTPCodes.InternalServerError_500;
                    
119                context.Response.Substatus = ex.Message;
                    
190            {
                    
191                return CH.HTTPCodes.InternalServerError_500;
                    
192            }
                    
193
                    
194            return CH.HTTPCodes.OK_200;
                    
195        }
                    
                
Postmark.php https://github.com/hgmnz/Bogota-Conf-Website.git | PHP | 452 lines
                    
406		
                    
407		$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
408		log_message('debug', 'POSTMARK http code:' . $httpCode);
                    
409		
                    
410		if (intval($httpCode / 100) != 2) {
                    
411			$message = json_decode($return)->Message;
                    
411			$message = json_decode($return)->Message;
                    
412			show_error('Error while mailing. Postmark returned HTTP code ' . $httpCode . ' with message "'.$message.'"');
                    
413		}
                    
                
ApiOAuth2Test.php https://gitlab.com/oytunistrator/google-api-php-client | PHP | 256 lines
                    
67    $response->expects($this->any())
                    
68            ->method('getResponseHttpCode')
                    
69            ->will($this->returnValue(200));
                    
225    $response->expects($this->any())
                    
226            ->method('getResponseHttpCode')
                    
227            ->will($this->returnValue(200));
                    
                
BucketManager.php https://gitlab.com/tangsengjiu/Talk | PHP | 341 lines
                    
235     *              [
                    
236     *                   { "code" => <HttpCode int>, "data" => <Data> },
                    
237     *                   { "code" => <HttpCode int> },
                    
237     *                   { "code" => <HttpCode int> },
                    
238     *                   { "code" => <HttpCode int> },
                    
239     *                   { "code" => <HttpCode int> },
                    
239     *                   { "code" => <HttpCode int> },
                    
240     *                   { "code" => <HttpCode int>, "data" => { "error": "<ErrorMessage string>" } },
                    
241     *                   ...
                    
                
test-timber-comment-avatar.php https://gitlab.com/aristath/timber | PHP | 140 lines
                    
134			/* Check for 404 (file not found). */
                    
135			$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
                    
136			curl_close($handle);
                    
136			curl_close($handle);
                    
137	  		return $httpCode;
                    
138		}
                    
                
exceptionhandler.php https://github.com/feri/midgardmvc_core.git | PHP | 281 lines
                    
165            case 'midgardmvc_exception_httperror':
                    
166                return $exception->getHttpCode();
                    
167        }
                    
214
                    
215    public function getHttpCode()
                    
216    {
                    
233
                    
234    public function getHttpCode()
                    
235    {
                    
252
                    
253    public function getHttpCode()
                    
254    {
                    
265{
                    
266    protected $httpcode = 500;
                    
267    // Redefine the exception so message isn't optional
                    
                
OAuth.java https://github.com/levelcap/isohealth.git | Java | 355 lines
                    
95         */
                    
96        public static final Map<String, Integer> TO_HTTP_CODE = mapToHttpCode();
                    
97
                    
97
                    
98        private static Map<String, Integer> mapToHttpCode() {
                    
99            Integer badRequest = new Integer(400);
                    
                
common_metrics.yml https://gitlab.com/innerwhisper/gitlab-ce | YAML | 214 lines
                    
113    - id: response_metrics_aws_elb_http_error_rate
                    
114      query_range: 'sum(aws_elb_httpcode_backend_5_xx_sum{%{environment_filter}}) / sum(aws_elb_request_count_sum{%{environment_filter}})'
                    
115      label: HTTP Errors (%)
                    
                
Request.php https://gitlab.com/bhargavi_dcw/dflocal | PHP | 498 lines
                    
21 * Upon execution, the
                    
22 * responseHttpCode, responseHeaders and responseBody will be filled in.
                    
23 *
                    
54
                    
55    protected $responseHttpCode;
                    
56
                    
155     */
                    
156    public function getResponseHttpCode()
                    
157    {
                    
165     */
                    
166    public function setResponseHttpCode($responseHttpCode)
                    
167    {
                    
167    {
                    
168        $this->responseHttpCode = $responseHttpCode;
                    
169    }
                    
                
Abstract.php https://bitbucket.org/congbang10h/ts20160327.git | PHP | 312 lines
                    
116
                    
117    list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
                    
118
                    
118
                    
119    if ($respHttpCode == 304 && $cached) {
                    
120      // If the server responded NOT_MODIFIED, return the cached request.
                    
128
                    
129    $request->setResponseHttpCode($respHttpCode);
                    
130    $request->setResponseHeaders($responseHeaders);
                    
                
delete.go git://github.com/pomack/dsocial.go.git | Go | 423 lines
                    
298func (p *DeleteAccountRequestHandler) ProcessPost(req wm.Request, cxt wm.Context) (wm.Request, wm.Context, int, http.Header, io.WriterTo, error) {
                    
299    _, req, cxt, httpCode, httpError := p.DeleteResource(req, cxt)
                    
300    return req, cxt, httpCode, nil, nil, httpError
                    
                
EasyCurlHelperClasses.php https://github.com/aajiwani/Easy-CURL-for-PHP.git | PHP | 274 lines
                    
217
                    
218class EasyCurlHTTPCodeInfo
                    
219{
                    
                
getinfo.c https://gitlab.com/envieidoc/tomato | C | 380 lines
                    
54
                    
55  info->httpcode = 0;
                    
56  info->httpversion = 0;
                    
132  case CURLINFO_RESPONSE_CODE:
                    
133    *param_longp = data->info.httpcode;
                    
134    break;
                    
                
Delete.pm git://github.com/mogilefs/MogileFS-Server.git | Perl | 385 lines
                    
88
                    
89    my $httpcode = $res->code;
                    
90
                    
91    # effectively means all went well
                    
92    return 1 if (($httpcode >= 200 && $httpcode <= 299) || $httpcode == 404);
                    
93
                    
                
ReportDownloader.php https://github.com/markvince/CakePHP-GAStats-Plugin.git | PHP | 141 lines
                    
100    $result = $curlUtils->Exec($ch);
                    
101    $httpCode = $curlUtils->GetInfo($ch, CURLINFO_HTTP_CODE);
                    
102    $error = $curlUtils->Error($ch);
                    
109
                    
110    if ($httpCode != 200) {
                    
111      $message = sprintf('Invalid report download URL: %s', $downloadUrl);
                    
111      $message = sprintf('Invalid report download URL: %s', $downloadUrl);
                    
112      throw new InvalidArgumentException($message, $httpCode);
                    
113    }
                    
                
Abstract.php https://gitlab.com/ifelipa/Proyecto-DAW | PHP | 339 lines
                    
135
                    
136        list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
                    
137
                    
137
                    
138        if ($respHttpCode == 304 && $cached) {
                    
139            // If the server responded NOT_MODIFIED, return the cached request.
                    
147
                    
148        $request->setResponseHttpCode($respHttpCode);
                    
149        $request->setResponseHeaders($responseHeaders);
                    
                
Server.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 315 lines
                    
266        if ($exception instanceof Mage_Api2_Exception && $exception->getCode()) {
                    
267            $httpCode = $exception->getCode();
                    
268        } else {
                    
268        } else {
                    
269            $httpCode = self::HTTP_INTERNAL_ERROR;
                    
270        }
                    
292            //tunnelling of 406(Not acceptable) error
                    
293            $httpCode = $e->getCode() == self::HTTP_NOT_ACCEPTABLE    //$e->getCode() can result in one more loop
                    
294                    ? self::HTTP_NOT_ACCEPTABLE                      // of try..catch
                    
300        }
                    
301        $response->setHttpResponseCode($httpCode);
                    
302
                    
                
4-2-migration-guide.rst https://github.com/cakephp/docs.git | ReStructuredText | 216 lines
                    
93  for ``HttpException`` only. Other exceptions that should return a non-500
                    
94  HTTP code are controlled by ``ExceptionRenderer::$exceptionHttpCodes``.
                    
95
                    
97      If you need to restore the previous behavior until your exceptions are updated,
                    
98      you can create a custom ExceptionRenderer and override the ``getHttpCode()`` function.
                    
99      See :ref:`custom-exceptionrenderer` for more information.
                    
                
ResponseTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 221 lines
                    
165        $exceptionMessage = 'Message';
                    
166        $exceptionHttpCode = \Magento\Framework\Webapi\Exception::HTTP_BAD_REQUEST;
                    
167        $exception = new \Magento\Framework\Webapi\Exception(new Phrase($exceptionMessage), 0, $exceptionHttpCode);
                    
                
http_assertions.go https://gitlab.com/davejlong/gitlab-ci-multi-runner | Go | 157 lines
                    
10
                    
11// httpCode is a helper that returns HTTP code of the response. It returns -1
                    
12// if building a new request fails.
                    
12// if building a new request fails.
                    
13func httpCode(handler http.HandlerFunc, mode, url string, values url.Values) int {
                    
14	w := httptest.NewRecorder()
                    
28func HTTPSuccess(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool {
                    
29	code := httpCode(handler, mode, url, values)
                    
30	if code == -1 {
                    
41func HTTPRedirect(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool {
                    
42	code := httpCode(handler, mode, url, values)
                    
43	if code == -1 {
                    
54func HTTPError(t TestingT, handler http.HandlerFunc, mode, url string, values url.Values) bool {
                    
55	code := httpCode(handler, mode, url, values)
                    
56	if code == -1 {
                    
                
Client.php https://gitlab.com/johanlindberg/irvato-crm | PHP | 260 lines
                    
213
                    
214        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
215        $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
                    
231            'result' => (null !== $resultArray) ? $resultArray: $responceBody,
                    
232            'code' => intval($httpCode),
                    
233            'contentType' => $contentType,
                    
                
http_assertions.go https://gitlab.com/github-cloud-corporation/bootkube | Go | 157 lines
                    
10
                    
11// httpCode is a helper that returns HTTP code of the response. It returns -1
                    
12// if building a new request fails.
                    
12// if building a new request fails.
                    
13func httpCode(handler http.HandlerFunc, method, url string, values url.Values) int {
                    
14	w := httptest.NewRecorder()
                    
28func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool {
                    
29	code := httpCode(handler, method, url, values)
                    
30	if code == -1 {
                    
41func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool {
                    
42	code := httpCode(handler, method, url, values)
                    
43	if code == -1 {
                    
54func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool {
                    
55	code := httpCode(handler, method, url, values)
                    
56	if code == -1 {
                    
                
http.class.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 438 lines
                    
47		var $sid;
                    
48		var $httpCode;
                    
49		var $repost=false;
                    
                
IntrospectionEndpoint.java https://gitlab.com/jslee1/OpenID-Connect-Java-Spring-Server | Java | 210 lines
                    
32import org.mitre.openid.connect.service.UserInfoService;
                    
33import org.mitre.openid.connect.view.HttpCodeView;
                    
34import org.mitre.openid.connect.view.JsonEntityView;
                    
136				model.addAttribute("code", HttpStatus.FORBIDDEN);
                    
137				return HttpCodeView.VIEWNAME;
                    
138
                    
                
server.js https://bitbucket.org/andrioid/netgrade-release.git | JavaScript | 271 lines
                    
115    should_return_httpok_header_for_webroot: function(test) {
                    
116        var HttpCode;
                    
117        var response = {}; // mock object for the response
                    
119        response.writeHead = function(code, contentType) {
                    
120            HttpCode = code;
                    
121            test.equal(HttpCode, 200);
                    
132    should_fallback_to_filesystem_if_no_route_found: function(test) {
                    
133        var HttpCode = null;
                    
134        var response = {}; // mock object for the response
                    
144        response.writeHead = function(code, contentType) {
                    
145            HttpCode = code;
                    
146        }
                    
194    should_return_404_when_no_handler_and_no_file: function(test) {
                    
195        var HttpCode = null;
                    
196        var response = {}; // mock object for the response
                    
                
homePageModel.php https://dotnetservicesphp.svn.codeplex.com/svn | PHP | 260 lines
                    
98			
                    
99			$httpCode = $regionsFeedData['http_code'];
                    
100			$response = $regionsFeedData['response'];
                    
104			
                    
105			if ($httpCode == '202'){
                    
106				$regionObj = new AtomParser($response);
                    
109			} else {
                    
110				$regionListArr['error'] = 'Error Code '.$httpCode.':'.getStatusCodeMessage($httpCode).' For get regions';
                    
111			}
                    
154
                    
155			$httpCode = $productsFeedData['http_code'];
                    
156			$response = $productsFeedData['response'];
                    
165			} else {
                    
166				$productsArr['error'] = 'Error Code '.$httpCode.':'.getStatusCodeMessage($httpCode).' for get products';
                    
167			}
                    
                
WrapResponse.java https://gitlab.com/mkgobaco/baasbox.git | Java | 208 lines
                    
37import com.baasbox.BBConfiguration;
                    
38import com.baasbox.controllers.CustomHttpCode;
                    
39
                    
60	private SimpleResult onCustomCode(int statusCode, RequestHeader request, String data) throws IOException {
                    
61		CustomHttpCode customCode = CustomHttpCode.getFromBbCode(statusCode);
                    
62		ObjectNode result=null;
                    
67		}
                    
68		result.put("http_code", customCode.getHttpCode());
                    
69		result.put("bb_code", String.valueOf(customCode.getBbCode()));
                    
69		result.put("bb_code", String.valueOf(customCode.getBbCode()));
                    
70		return Results.status(customCode.getHttpCode(), result);	
                    
71	}
                    
179			      	default:  	
                    
180			      		if (CustomHttpCode.getFromBbCode(statusCode)!=null){
                    
181			      	        result = onCustomCode(statusCode,ctx.request(),stringBody);		
                    
                
Google_OAuth2.php https://github.com/AJenbo/ubuntudanmark.dk.git | PHP | 453 lines
                    
104
                    
105      if ($request->getResponseHttpCode() == 200) {
                    
106        $this->setAccessToken($request->getResponseBody());
                    
114        }
                    
115        throw new Google_AuthException("Error fetching OAuth2 access token, message: '$response'", $request->getResponseHttpCode());
                    
116      }
                    
271
                    
272    $code = $request->getResponseHttpCode();
                    
273    $body = $request->getResponseBody();
                    
304    $response = Google_Client::$io->makeRequest($request);
                    
305    $code = $response->getResponseHttpCode();
                    
306    if ($code == 200) {
                    
336        self::OAUTH2_FEDERATED_SIGNON_CERTS_URL));
                    
337    if ($request->getResponseHttpCode() == 200) {
                    
338      $certs = json_decode($request->getResponseBody(), true);
                    
                
http_assertions.go https://gitlab.com/ipernet/gitlab-shell | Go | 143 lines
                    
10
                    
11// httpCode is a helper that returns HTTP code of the response. It returns -1 and
                    
12// an error if building a new request fails.
                    
12// an error if building a new request fails.
                    
13func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) {
                    
14	w := httptest.NewRecorder()
                    
32	}
                    
33	code, err := httpCode(handler, method, url, values)
                    
34	if err != nil {
                    
55	}
                    
56	code, err := httpCode(handler, method, url, values)
                    
57	if err != nil {
                    
78	}
                    
79	code, err := httpCode(handler, method, url, values)
                    
80	if err != nil {
                    
                
AIM-MSTR-TargetGroups.yml https://bitbucket.org/dmehlberg/bit-lb.git | YAML | 265 lines
                    
28      Matcher:
                    
29        HttpCode: '200'
                    
30      Name: Assetworks-Dev-443-ALB-mcf
                    
49      Matcher:
                    
50        HttpCode: '200'
                    
51      Name: Assetworks-Test-443-ALB-mcf
                    
70      Matcher:
                    
71        HttpCode: '200'
                    
72      Name: Assetworks-443-ALB-mcf
                    
91      Matcher:
                    
92        HttpCode: '200'
                    
93      Name: aim1-dev-8443-ALB-mcf
                    
112      Matcher:
                    
113        HttpCode: '200'
                    
114      Name: aim1-test-8443-ALB-mcf
                    
                
REST.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 178 lines
                    
74  {
                    
75    $code = $response->getResponseHttpCode();
                    
76    $body = $response->getResponseBody();
                    
                
daemon_restart.go https://gitlab.com/CORP-RESELLER/kubernetes | Go | 320 lines
                    
104		if result.Code == 0 {
                    
105			httpCode, err := strconv.Atoi(result.Stdout)
                    
106			if err != nil {
                    
107				framework.Logf("Unable to parse healthz http return code: %v", err)
                    
108			} else if httpCode == 200 {
                    
109				return true, nil
                    
                
UIGDownload.php https://github.com/CORE-POS/IS4C.git | PHP | 330 lines
                    
92$body = curl_exec($ch);
                    
93$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
94$referer = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
                    
                
PaycardFixVoid.php https://github.com/CORE-POS/IS4C.git | PHP | 319 lines
                    
101            previousPaycardTransactionID, processor, refNum, live, cardType, transType, amount, PAN, issuer,
                    
102            name, manual, requestDatetime, responseDatetime, seconds, commErr, httpCode, validResponse,
                    
103            xResultCode, xApprovalNumber, xResponseCode, xResultMessage, xTransactionID, xBalance, xToken,
                    
                
RedirectorTest.php https://github.com/bhaumik25/zend-framework.git | PHP | 368 lines
                    
225
                    
226    public function testSetGotoUrlWithHttpCodeUsingCodeProperty()
                    
227    {
                    
233
                    
234    public function testSetGotoUrlWithHttpCodeUsingCodeOption()
                    
235    {
                    
                
AjaxControllerAttribute.cs https://github.com/pworst/BoC.git | C# | 165 lines
                    
99                        {
                    
100                            filterContext.HttpContext.Response.StatusCode = ((HttpException)exc).GetHttpCode();
                    
101                        }
                    
153                {
                    
154                    filterContext.HttpContext.Response.StatusCode = ((HttpException)filterContext.Exception).GetHttpCode();
                    
155                }
                    
                
SQLDBRelationalBasedPersistenceManager.cs https://github.com/mbmccormick/Ximura.git | C# | 222 lines
                    
94                context.Request.DataVersionID = vid;
                    
95                context.Response.Status = CH.HTTPCodes.Continue_100;
                    
96
                    
130                {
                    
131                    context.Response.Status = CH.HTTPCodes.BadRequest_400;
                    
132                    return true;
                    
137                {
                    
138                    context.Response.Status = CH.HTTPCodes.NotFound_404;
                    
139                    return true;
                    
146                {
                    
147                    context.Response.Status = CH.HTTPCodes.PreconditionFailed_412;
                    
148                    return true;
                    
150
                    
151                context.Response.Status = CH.HTTPCodes.OK_200;
                    
152            }
                    
                
Couch.py https://github.com/PerilousApricot/WMCore-OLDOLD.git | Python | 291 lines
                    
277                    if occurrences >= threshold:
                    
278                        details = dict(HTTPCode = code,
                    
279                                       occurrences = occurrences, 
                    
                
HandleErrorAttribute.cs https://github.com/iainlane/mono.git | C# | 119 lines
                    
91            // ignore it.
                    
92            if (new HttpException(null, exception).GetHttpCode() != 500) {
                    
93                return;
                    
                
PlayFabEditorModels.cs https://gitlab.com/4t0m1c/playfab-tutorials | C# | 463 lines
                    
155    {
                    
156        public int HttpCode;
                    
157        public string HttpStatus;
                    
                
TumblrBlog.php https://github.com/bdalziel/tumblwrapper.git | PHP | 150 lines
                    
132    $data = curl_exec($ch);
                    
133    $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
134    curl_close($ch);    
                    
136    // Todo: Throw exceptions
                    
137    if ($httpcode>=200 && $httpcode<300) {
                    
138
                    
                
functions.js https://github.com/OpenNebula/one.git | JavaScript | 132 lines
                    
31
                    
32const { defaults, httpCodes } = require('server/utils/constants')
                    
33const { Actions } = require('server/utils/constants/commands/user')
                    
39
                    
40const { internalServerError, unauthorized } = httpCodes
                    
41
                    
110    const error = (err) => {
                    
111      const httpCodeError = err ? internalServerError : unauthorized
                    
112      updaterResponse(new Map(httpCodeError).toObject())
                    
112      updaterResponse(new Map(httpCodeError).toObject())
                    
113      writeInLogger(httpCodeError)
                    
114      next()
                    
                
poll_spec.js https://gitlab.com/artofhuman/gitlab-ce | JavaScript | 190 lines
                    
99  describe('for 2xx status code', () => {
                    
100    successCodes.forEach(httpCode => {
                    
101      it(`starts polling when http status is ${httpCode} and interval header is provided`, done => {
                    
101      it(`starts polling when http status is ${httpCode} and interval header is provided`, done => {
                    
102        mockServiceCall(service, { status: httpCode, headers: { 'poll-interval': 1 } });
                    
103
                    
                
UserInfoEndpoint.java https://gitlab.com/jslee1/OpenID-Connect-Java-Spring-Server | Java | 142 lines
                    
25import org.mitre.openid.connect.service.UserInfoService;
                    
26import org.mitre.openid.connect.view.HttpCodeView;
                    
27import org.mitre.openid.connect.view.UserInfoJWTView;
                    
79			logger.error("getInfo failed; no principal. Requester is not authorized.");
                    
80			model.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN);
                    
81			return HttpCodeView.VIEWNAME;
                    
88			logger.error("getInfo failed; user not found: " + username);
                    
89			model.addAttribute(HttpCodeView.CODE, HttpStatus.NOT_FOUND);
                    
90			return HttpCodeView.VIEWNAME;
                    
                
ApiShellTest.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 95 lines
                    
70			'12. header($status)',
                    
71			'13. httpCodes($code = NULL)',
                    
72			'14. implementedEvents()',
                    
                
Common_HTTP.cs https://github.com/mbmccormick/Ximura.git | C# | 239 lines
                    
40        /// </summary>
                    
41        public class HTTPCodes
                    
42        {
                    
                
HttpExceptionTrait.php https://github.com/FabienD/symfony.git | PHP | 78 lines
                    
31
                    
32        $httpCodeFound = false;
                    
33        $isJson = false;
                    
35            if (str_starts_with($h, 'HTTP/')) {
                    
36                if ($httpCodeFound) {
                    
37                    break;
                    
40                $message = sprintf('%s returned for "%s".', $h, $url);
                    
41                $httpCodeFound = true;
                    
42            }
                    
48
                    
49                if ($httpCodeFound) {
                    
50                    break;
                    
                
Google_CurlIO.php https://gitlab.com/x33n/platform | PHP | 278 lines
                    
52   * @return Google_HttpRequest The resulting HTTP response including the
                    
53   * responseHttpCode, responseHeaders and responseBody.
                    
54   */
                    
122    $respHeaderSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
                    
123    $respHttpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
124    $curlErrorNum = curl_errno($ch);
                    
127    if ($curlErrorNum != CURLE_OK) {
                    
128      throw new Google_IOException("HTTP Error: ($respHttpCode) $curlError");
                    
129    }
                    
134
                    
135    if ($respHttpCode == 304 && $cached) {
                    
136      // If the server responded NOT_MODIFIED, return the cached request.
                    
154    // Fill in the apiHttpRequest with the response values
                    
155    $request->setResponseHttpCode($respHttpCode);
                    
156    $request->setResponseHeaders($responseHeaders);
                    
                
metrics.go https://gitlab.com/hasura/kubernetes | Go | 245 lines
                    
68
                    
69func Monitor(verb, resource *string, client string, httpCode int, reqStart time.Time) {
                    
70	elapsed := float64((time.Since(reqStart)) / time.Microsecond)
                    
70	elapsed := float64((time.Since(reqStart)) / time.Microsecond)
                    
71	requestCounter.WithLabelValues(*verb, *resource, client, codeToString(httpCode)).Inc()
                    
72	requestLatencies.WithLabelValues(*verb, *resource).Observe(elapsed)
                    
                
Stream.php https://gitlab.com/wuhang2003/core | PHP | 211 lines
                    
121    $response_data = false;
                    
122    $respHttpCode = self::UNKNOWN_CODE;
                    
123    if ($fh) {
                    
130
                    
131      $respHttpCode = $this->getHttpResponseCode($http_response_header);
                    
132    }
                    
137              "HTTP Error: Unable to connect: '%s'",
                    
138              $respHttpCode
                    
139          ),
                    
139          ),
                    
140          $respHttpCode
                    
141      );
                    
145
                    
146    return array($response_data, $responseHeaders, $respHttpCode);
                    
147  }
                    
                
serverlist.cpp https://github.com/mabako/mta-browser.git | C++ | 374 lines
                    
69					/* Check for HTTP Status code */
                    
70					long httpcode = 0;
                    
71					curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &httpcode );
                    
71					curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &httpcode );
                    
72					switch( httpcode )
                    
73					{
                    
91							stringstream ss;
                    
92							ss << "GM Error " << httpcode;
                    
93							error = ss.str( );
                    
                
apns.php https://bitbucket.org/jitdxpert/speeddialweb.git | PHP | 278 lines
                    
61	$response = curl_exec($ch);
                    
62	$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
63
                    
                
misultin_req.erl https://github.com/essiene/misultin.git | Erlang | 280 lines
                    
97% Description: Formats a response.
                    
98respond(HttpCode, Template) ->
                    
99	respond(HttpCode, [], Template).
                    
99	respond(HttpCode, [], Template).
                    
100respond(HttpCode, Headers, Template) ->
                    
101	{HttpCode, Headers, Template}.
                    
101	{HttpCode, Headers, Template}.
                    
102respond(HttpCode, Headers, Template, Vars) when is_list(Template) =:= true ->
                    
103	{HttpCode, Headers, io_lib:format(Template, Vars)}.
                    
115	catch SocketPid ! {stream_data, io_lib:format(Template, Vars)}.
                    
116stream(head, HttpCode, Headers) ->
                    
117	catch SocketPid ! {stream_head, HttpCode, Headers}.
                    
                
Google_REST.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 128 lines
                    
50  public static function decodeHttpResponse($response) {
                    
51    $code = $response->getResponseHttpCode();
                    
52    $body = $response->getResponseBody();
                    
                
Makefile.am http://dataparksearch.googlecode.com/svn/trunk/ | Makefile | 226 lines
                    
20htmlparser.xml \
                    
21httpcodes.xml \
                    
22index.xml \
                    
70htmlparser-ru.xml \
                    
71httpcodes-ru.xml \
                    
72index-ru.xml \
                    
                
package-frame.html https://github.com/oloed/netty.github.com.git | HTML | 174 lines
                    
117          	          	<li>
                    
118            	<a href="SpdyHttpCodec.html" target="classFrame">SpdyHttpCodec</a>
                    
119          	</li>
                    
                
view.go https://github.com/pomack/dsocial.go.git | Go | 391 lines
                    
267    if len(mths) > 0 {
                    
268        httpCode, httpHeaders, writerTo := mths[0].MediaTypeHandleInputFrom(req, cxt)
                    
269        return req, cxt, httpCode, httpHeaders, writerTo, nil
                    
                
PolicyAPI.java git://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server.git | Java | 391 lines
                    
22
                    
23import org.mitre.openid.connect.view.HttpCodeView;
                    
24import org.mitre.openid.connect.view.JsonEntityView;
                    
98		if (rs == null) {
                    
99			m.addAttribute(HttpCodeView.CODE, HttpStatus.NOT_FOUND);
                    
100			return HttpCodeView.VIEWNAME;
                    
106			// authenticated user didn't match the owner of the resource set
                    
107			m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN);
                    
108			return HttpCodeView.VIEWNAME;
                    
128		if (rs == null) {
                    
129			m.addAttribute(HttpCodeView.CODE, HttpStatus.NOT_FOUND);
                    
130			return HttpCodeView.VIEWNAME;
                    
136			// authenticated user didn't match the owner of the resource set
                    
137			m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN);
                    
138			return HttpCodeView.VIEWNAME;
                    
                
Test.php https://gitlab.com/hoanghung.dev/aloads | PHP | 115 lines
                    
32        $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
                    
33        if ($httpCode == 404 || $httpCode == 403 || $httpCode == 400) {
                    
34            return 0;
                    
                
getinfo.c https://bitbucket.org/KonstantinovSlava/curl.git | C | 469 lines
                    
58
                    
59  info->httpcode = 0;
                    
60  info->httpproxycode = 0;
                    
152  case CURLINFO_RESPONSE_CODE:
                    
153    *param_longp = data->info.httpcode;
                    
154    break;
                    
                
Global.asax.cs https://gitlab.com/thanhhung95/managecourse | C# | 193 lines
                    
75
                    
76                    switch (httpEx.GetHttpCode())
                    
77                    {
                    
92                httpContext.Response.Clear();
                    
93                httpContext.Response.StatusCode = ex is HttpException ? ((HttpException)ex).GetHttpCode() : 500;
                    
94                httpContext.Response.TrySkipIisCustomErrors = true;
                    
137
                    
138                    switch (httpEx.GetHttpCode())
                    
139                    {
                    
154                httpContext.Response.Clear();
                    
155                //httpContext.Response.StatusCode = ex is HttpException ? ((HttpException)ex).GetHttpCode() : 500;
                    
156                //httpContext.Response.TrySkipIisCustomErrors = true;
                    
                
apiOAuth2.php git://github.com/gkwelding/FuelPHP-Social-Package.git | PHP | 386 lines
                    
93      )));
                    
94      if ($request->getResponseHttpCode() == 200) {
                    
95        $this->setAccessToken($request->getResponseBody());
                    
103        }
                    
104        throw new apiAuthException("GError fetching OAuth2 access token, message: '$response'", $request->getResponseHttpCode());
                    
105      }
                    
224          new apiHttpRequest(self::OAUTH2_TOKEN_URI, 'POST', array(), $params));
                    
225    $code = $request->getResponseHttpCode();
                    
226    $body = $request->getResponseBody();
                    
257    $response = apiClient::$io->makeRequest($request);
                    
258    $code = $response->getResponseHttpCode();
                    
259    if ($code == 200) {
                    
273        self::OAUTH2_FEDERATED_SIGNON_CERTS_URL));
                    
274    if ($request->getResponseHttpCode() == 200) {
                    
275      $certs = json_decode($request->getResponseBody(), true);
                    
                
android.bat https://gitlab.com/Codeaurora/platform_sdk | Batch | 89 lines
                    
66    copy /B /D /Y lib\httpclient*        %tmp_dir%\lib\        > nul
                    
67    copy /B /D /Y lib\httpcode*          %tmp_dir%\lib\        > nul
                    
68    copy /B /D /Y lib\httpmime*          %tmp_dir%\lib\        > nul
                    
                
ScriptModule.cs https://github.com/pruiz/mono.git | C# | 194 lines
                    
92                string errorMessage = (string)context.Items[PageRequestManager.AsyncPostBackErrorMessageKey];
                    
93                o = context.Items[PageRequestManager.AsyncPostBackErrorHttpCodeKey];
                    
94                // o should definitely be an int, but user code could overwrite it
                    
94                // o should definitely be an int, but user code could overwrite it
                    
95                int httpCode = (o is int) ? (int)o : 500;
                    
96
                    
98                    PageRequestManager.ErrorToken,
                    
99                    httpCode.ToString(CultureInfo.InvariantCulture),
                    
100                    errorMessage);
                    
                
NetHelper.php https://gitlab.com/x33n/ImpressPages | PHP | 156 lines
                    
72        $headerLength = curl_getinfo($handle, CURLINFO_HEADER_SIZE);
                    
73        $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
                    
74        $body = substr($response, $headerLength);
                    
77        if ($httpCode != 200) {
                    
78            throw new \Ip\Exception('Could not fetch uri', array('httpCode' => $httpCode));
                    
79        }
                    
                
SQLDBPersistenceManager_Read.cs https://github.com/mbmccormick/Ximura.git | C# | 210 lines
                    
170            {
                    
171                context.Response.Status = CH.HTTPCodes.NotFound_404;
                    
172                context.Response.Substatus = "DataVersionID and DataContentID are null.";
                    
202            {
                    
203                context.Response.Status = CH.HTTPCodes.InternalServerError_500;
                    
204                context.Response.Substatus = ex.Message;
                    
                
Curl.php git://github.com/hybridauth/hybridauth.git | PHP | 316 lines
                    
78     */
                    
79    protected $responseHttpCode = 0;
                    
80
                    
158        $this->responseBody = $response;
                    
159        $this->responseHttpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
                    
160        $this->responseClientError = curl_error($curl);
                    
191            'response' => [
                    
192                'code' => $this->getResponseHttpCode(),
                    
193                'headers' => $this->getResponseHeader(),
                    
244     */
                    
245    public function getResponseHttpCode()
                    
246    {
                    
246    {
                    
247        return $this->responseHttpCode;
                    
248    }
                    
                
OutputTransformCCState.cs https://github.com/mbmccormick/Ximura.git | C# | 96 lines
                    
59                    context.Response.Body.ContentType = "application/xml; charset=utf-8";
                    
60                    context.Response.Status = CH.HTTPCodes.OK_200;
                    
61                    return;
                    
76                context.Request.Data.ResponseHeaderAdd("Cache-control", "must-revalidate");
                    
77                context.Response.Status = CH.HTTPCodes.OK_200;
                    
78            }
                    
81                context.Response.Body = null;
                    
82                context.Response.Status = CH.HTTPCodes.InternalServerError_500;
                    
83                context.Response.Substatus = ex.Message;
                    
                
AbstractHttpData.java https://github.com/maerqiang/netty.git | Java | 108 lines
                    
36
                    
37    protected Charset charset = HttpCodecUtil.DEFAULT_CHARSET;
                    
38
                    
                
phttpd.tcl https://gitlab.com/zchee/ccgo | TCL | 686 lines
                    
51    variable MimeTypes;       # Cache of file-extension/mime-type
                    
52    variable HttpCodes;       # Portion of well-known http return codes
                    
53    variable ErrorPage;       # Format of error response page in html
                    
60    }
                    
61    array set HttpCodes {
                    
62        400  "Bad Request"
                    
455    variable Httpd
                    
456    variable HttpCodes
                    
457    variable ErrorPage
                    
463             $code             \
                    
464             $HttpCodes($code) \
                    
465             $HttpCodes($code) \
                    
472    if {[catch {
                    
473        puts $data(sock) "HTTP/1.0 $code $HttpCodes($code)"
                    
474        puts $data(sock) "Date: [Date]"
                    
                
SearchController.java https://github.com/Graylog2/graylog2-web-interface.git | Java | 204 lines
                    
116        } catch (APIException e) {
                    
117            String message = "There was a problem with your search. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
                    
118            return status(504, views.html.errors.error.render(message, e, request()));
                    
154        } catch (APIException e) {
                    
155            String message = "There was a problem with your search. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
                    
156            return status(504, views.html.errors.error.render(message, e, request()));
                    
                
RunInterface.php https://gitlab.com/madwanz64/laravel | PHP | 140 lines
                    
90     */
                    
91    public function sendHttpCode($code = null);
                    
92
                    
                
CHANGELOG.md https://github.com/stof/symfony.git | Markdown | 98 lines
                    
12 * The `$actionLevel` constructor argument of `NotFoundActivationStrategy` has been replaced by the `$inner` one which expects an `ActivationStrategyInterface` to decorate instead
                    
13 * The `$actionLevel` constructor argument of `HttpCodeActivationStrategy` has been replaced by the `$inner` one which expects an `ActivationStrategyInterface` to decorate instead
                    
14 * Remove `ResetLoggersWorkerSubscriber` in favor of "reset_on_message" option in messenger configuration
                    
31 * The `$actionLevel` constructor argument of `Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy` has been deprecated and replaced by the `$inner` one which expects an ActivationStrategyInterface to decorate instead. `Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy` will become final in 6.0.
                    
32 * The `$actionLevel` constructor argument of `Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy` has been deprecated and replaced by the `$inner` one which expects an ActivationStrategyInterface to decorate instead. `Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy` will become final in 6.0
                    
33
                    
                
functions.js https://github.com/OpenNebula/one.git | JavaScript | 440 lines
                    
20
                    
21const { defaults, httpCodes } = require('server/utils/constants')
                    
22
                    
34
                    
35const { ok, internalServerError, badRequest } = httpCodes
                    
36
                    
196        }
                    
197        res.locals.httpCode = httpResponse(
                    
198          method,
                    
204      () => {
                    
205        res.locals.httpCode = internalServerError
                    
206        next()
                    
209  } else {
                    
210    res.locals.httpCode = httpBadRequest
                    
211    next()
                    
                
TwitterOAuth.php https://gitlab.com/Hungcis/testvagrant | PHP | 448 lines
                    
74     */
                    
75    public function getLastHttpCode()
                    
76    {
                    
76    {
                    
77        return $this->response->getHttpCode();
                    
78    }
                    
129
                    
130        if ($this->getLastHttpCode() != 200) {
                    
131            throw new TwitterOAuthException($result);
                    
403
                    
404        $this->response->setHttpCode(curl_getinfo($curlHandle, CURLINFO_HTTP_CODE));
                    
405        $parts = explode("\r\n\r\n", $response);
                    
                
apiOAuth2.php https://bitbucket.org/baddog/google-latitude-history.git | PHP | 391 lines
                    
94
                    
95      if ($request->getResponseHttpCode() == 200) {
                    
96        $this->setAccessToken($request->getResponseBody());
                    
104        }
                    
105        throw new apiAuthException("Error fetching OAuth2 access token, message: '$response'", $request->getResponseHttpCode());
                    
106      }
                    
225          new apiHttpRequest(self::OAUTH2_TOKEN_URI, 'POST', array(), $params));
                    
226    $code = $request->getResponseHttpCode();
                    
227    $body = $request->getResponseBody();
                    
258    $response = apiClient::$io->makeRequest($request);
                    
259    $code = $response->getResponseHttpCode();
                    
260    if ($code == 200) {
                    
274        self::OAUTH2_FEDERATED_SIGNON_CERTS_URL));
                    
275    if ($request->getResponseHttpCode() == 200) {
                    
276      $certs = json_decode($request->getResponseBody(), true);
                    
                
Base.php https://gitlab.com/hoanghung.dev/phunuvadoisong.com | PHP | 158 lines
                    
151        $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
                    
152        if ($httpCode == 404 || $httpCode == 403 || $httpCode == 400) {
                    
153            return false;
                    
                
ComputeEngine.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 146 lines
                    
47   * @return Google_Http_Request The resulting HTTP response including the
                    
48   * responseHttpCode, responseHeaders and responseBody.
                    
49   */
                    
93
                    
94    if ($response->getResponseHttpCode() == 200) {
                    
95      $this->setAccessToken($response->getResponseBody());
                    
103          ),
                    
104          $response->getResponseHttpCode()
                    
105      );
                    
                
response.php https://bitbucket.org/samhunter3/redzu.git | PHP | 175 lines
                    
37	protected $decodedResponse;
                    
38	protected $httpCode;
                    
39	protected $contentType;
                    
42	function __construct($httpCode, $requestHeaders, $responseHeaders, $contentType, $rawResponse) {
                    
43		$this->httpCode = (int)$httpCode;
                    
44		$this->contentType = $contentType;
                    
103	private function _decodeResponse() {
                    
104		if (! (($this->httpCode >= 200) && ($this->httpCode < 400))) {
                    
105			$this->hasError = true;
                    
133	
                    
134	public function getHttpCode() {
                    
135		return $this->httpCode;
                    
                
curlio.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 204 lines
                    
122        $respheadersize = $infos['header_size'];
                    
123        $resphttpcode = (int) $infos['http_code'];
                    
124        $curlerrornum = $curl->get_errno();
                    
131        list($responseHeaders, $responseBody) = $this->parseHttpResponse($respdata, $respheadersize);
                    
132        return array($responseBody, $responseHeaders, $resphttpcode);
                    
133    }
                    
                
Error.php https://github.com/hpgihan/cronus.git | PHP | 174 lines
                    
82	 */
                    
83	protected function setHTTPCode() {
                    
84		header('HTTP/1.0 500 Internal Server Error');
                    
139
                    
140		$this->setHTTPCode();
                    
141
                    
                
Google_CurlIO.php https://gitlab.com/ngochuynh1991/cuacuon | PHP | 196 lines
                    
57   * @return Yoast_Google_HttpRequest The resulting HTTP response including the
                    
58   * responseHttpCode, responseHeaders and responseBody.
                    
59   */
                    
115    $respHeaderSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
                    
116    $respHttpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    
117    $curlErrorNum = curl_errno($ch);
                    
120    if ($curlErrorNum != CURLE_OK) {
                    
121      throw new Yoast_Google_IOException("HTTP Error: ($respHttpCode) $curlError");
                    
122    }
                    
127
                    
128    if ($respHttpCode == 304 && $cached) {
                    
129      // If the server responded NOT_MODIFIED, return the cached request.
                    
134    // Fill in the apiHttpRequest with the response values
                    
135    $request->setResponseHttpCode($respHttpCode);
                    
136    $request->setResponseHeaders($responseHeaders);
                    
                
CacheParser.php https://gitlab.com/bhargavi_dcw/dflocal | PHP | 182 lines
                    
81        }
                    
82        $code = $resp->getResponseHttpCode();
                    
83        if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
                    
                
 

Source

Language