Accent token request is giving error - vimeo-api

Hi I getting the following response when i request access token from my server using API https://api.vimeo.com/oauth/access_token. Is there some change in this API.
Need help, As this is server, why this response is comming.
<html lang="en">
<head>
<meta name="robots" content="noindex, nofollow">
<title>Vimeo / 429 Too Many Requests</title>
<script src="//www.google.com/recaptcha/api.js?hl=en"></script>
<script type='text/javascript'>
var done = function() {
document.getElementById('form').submit();
};
</script>
<style type="text/css">
body {
background: #141531;
font-family: helvetica, arial, sans-serif;
font-size: 18px;
font-weight: normal;
color: #fff;
}
p {
margin: 0 0 25px 0;
}
svg {
margin: 75px;
width: 250px;
}
div.content {
margin: 75px;
position: absolute;
bottom: 0px;
}
div.g-recaptcha {
width: 304px;
height: 78px;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 40"><path fill="#fff" d="M31.277 18.832c-.14 3.052-2.27 7.23-6.39 12.53-4.26 5.537-7.863 8.307-10.81 8.307-1.826 0-3.372-1.69-4.634-5.06-.843-3.1-1.686-6.19-2.53-9.28-.937-3.37-1.942-5.06-3.018-5.06-.234 0-1.054.49-2.458 1.473l-1.474-1.9c1.546-1.36 3.07-2.718 4.572-4.08 2.062-1.78 3.61-2.72 4.642-2.813 2.438-.234 3.938 1.433 4.502 5 .6 3.85 1.03 6.247 1.26 7.183.7 3.194 1.472 4.79 2.32 4.79.66 0 1.64-1.037 2.95-3.108 1.31-2.073 2.015-3.65 2.11-4.733.187-1.79-.517-2.684-2.11-2.684-.75 0-1.522.173-2.32.514 1.54-5.044 4.48-7.495 8.825-7.355 3.22.094 4.737 2.183 4.552 6.265z"/><path fill="#fff" d="M50.613 28.713c-1.313 2.484-3.12 4.733-5.417 6.748-3.143 2.72-6.285 4.08-9.425 4.08-1.45 0-2.57-.47-3.34-1.4-.77-.937-1.13-2.152-1.09-3.652.05-1.547.53-3.937 1.44-7.172.92-3.23 1.38-4.966 1.38-5.2 0-1.22-.422-1.83-1.265-1.83-.282 0-1.08.496-2.393 1.48l-1.62-1.9 4.5-4.08c2.02-1.784 3.52-2.72 4.507-2.814 1.546-.14 2.684.314 3.41 1.367.726 1.05.996 2.415.81 4.096-.61 2.85-1.27 6.47-1.972 10.863-.046 2.01.68 3.014 2.182 3.014.655 0 1.826-.69 3.517-2.08 1.406-1.156 2.555-2.243 3.447-3.26l1.336 1.753zm-6.12-25.016c-.047 1.168-.633 2.288-1.76 3.36-1.266 1.213-2.767 1.82-4.5 1.82-2.673 0-3.964-1.165-3.87-3.498.045-1.22.76-2.39 2.144-3.51C37.89.75 39.427.19 41.117.19c.983 0 1.804.388 2.46 1.156.657.772.962 1.553.916 2.344z"/><path fill="#fff" d="M94.543 28.713c-1.314 2.484-3.117 4.733-5.416 6.748-3.145 2.72-6.285 4.08-9.426 4.08-3.05 0-4.52-1.68-4.43-5.06.05-1.5.34-3.3.88-5.41.54-2.11.83-3.75.88-4.92.05-1.78-.49-2.673-1.62-2.673-1.222 0-2.68 1.456-4.374 4.36-1.79 3.05-2.754 6.005-2.894 8.86-.095 2.02.103 3.57.59 4.648-3.27.097-5.563-.443-6.87-1.616-1.17-1.033-1.71-2.743-1.615-5.136.045-1.5.276-3 .69-4.502.414-1.5.644-2.836.69-4.01.095-1.734-.54-2.604-1.9-2.604-1.177 0-2.444 1.34-3.806 4.01-1.36 2.675-2.113 5.467-2.253 8.373-.094 2.624.074 4.453.503 5.483-3.22.096-5.506-.582-6.858-2.035-1.12-1.214-1.632-3.06-1.54-5.54.047-1.214.26-2.91.648-5.084.39-2.175.607-3.87.65-5.087.094-.843-.12-1.265-.632-1.265-.28 0-1.08.476-2.393 1.425l-1.686-1.9c.232-.184 1.71-1.545 4.43-4.08 1.97-1.826 3.304-2.764 4.01-2.81 1.216-.095 2.2.41 2.95 1.51s1.13 2.38 1.13 3.835c0 .47-.05.915-.14 1.336.7-1.077 1.52-2.017 2.46-2.814 2.155-1.875 4.57-2.93 7.244-3.167 2.3-.19 3.94.35 4.926 1.615.795 1.033 1.17 2.51 1.125 4.433.33-.28.68-.586 1.057-.915 1.08-1.265 2.135-2.27 3.166-3.02 1.737-1.268 3.54-1.97 5.42-2.113 2.25-.188 3.87.35 4.854 1.61.843 1.03 1.22 2.5 1.126 4.415-.044 1.31-.36 3.213-.946 5.712-.588 2.5-.88 3.934-.88 4.31-.048.98.048 1.66.28 2.032.236.373.797.56 1.69.56.655 0 1.825-.694 3.517-2.084 1.403-1.156 2.552-2.243 3.444-3.262l1.336 1.757z"/><path fill="#fff" d="M120.922 28.642c-1.36 2.25-4.033 4.495-8.02 6.743-4.97 2.856-10.012 4.284-15.125 4.284-3.797 0-6.52-1.27-8.16-3.8-1.172-1.74-1.734-3.8-1.688-6.19.04-3.8 1.73-7.41 5.06-10.83 3.66-3.75 7.97-5.63 12.94-5.63 4.595 0 7.032 1.87 7.313 5.61.19 2.383-1.125 4.84-3.938 7.367-3.005 2.76-6.78 4.515-11.33 5.263.843 1.17 2.11 1.753 3.8 1.753 3.375 0 7.06-.856 11.045-2.575 2.86-1.205 5.11-2.46 6.753-3.76l1.338 1.756zm-15.97-7.345c.046-1.26-.468-1.89-1.546-1.89-1.406 0-2.83.97-4.283 2.906-1.45 1.936-2.2 3.79-2.248 5.562-.025 0-.025.305 0 .91 2.295-.838 4.287-2.12 5.97-3.848 1.358-1.49 2.06-2.707 2.108-3.64z"/><path fill="#fff" d="M140.018 23.926c-.19 4.31-1.78 8.03-4.783 11.17-3.002 3.136-6.73 4.705-11.186 4.705-3.71 0-6.52-1.19-8.45-3.58-1.405-1.772-2.18-4-2.32-6.67-.237-4.03 1.216-7.73 4.36-11.1 3.38-3.74 7.62-5.62 12.732-5.62 3.28 0 5.766 1.11 7.457 3.3 1.594 2.02 2.32 4.62 2.18 7.8zm-7.95-.264c.047-1.27-.13-2.434-.527-3.49-.4-1.057-.97-1.587-1.72-1.587-2.39 0-4.36 1.293-5.9 3.877-1.316 2.115-2.02 4.37-2.11 6.766-.05 1.176.163 2.21.632 3.104.514 1.032 1.24 1.55 2.18 1.55 2.11 0 3.915-1.245 5.417-3.736 1.267-2.068 1.945-4.23 2.04-6.484z"/></svg>
<div class="content">
<h1>You have been temporarily blocked</h1>
<p>Pardon the inconvenience, but our servers have detected a high number of errors from your connection. To continue, please verify that you are a human:</p>
<form id='form' action="/_unblock_ratelimit" method="post">
<div class="g-recaptcha" data-sitekey="6LeRCLwSAAAAAOJ1ba_xqd3NBOlV5P_XRWJVEPdw" data-theme="light" data-callback="done"></div>
<input type="hidden" name="previous_url" value="">
</form>
</div>
</body>
</html>

You are hitting the rate limit and your application is making too many requests to the Vimeo API. The rate limit ban expires after ~60 minutes after exceeding rate limit. It's best practice to immediately cease making requests to the API when a 429 error is returned, otherwise you may push back the rate limit ban reset time.
The actual rate limit varies across different account levels and endpoints, so always refer to the response headers for actual values. Here's an example of what the headers look like (obviously, your specific values will vary):
X-RateLimit-Limit →500
X-RateLimit-Remaining →499
X-RateLimit-Reset →2018-02-07T15:47:46+00:00
The best way to avoid hitting the rate limit on Vimeo's API is to use the fields filter on all your requests. Vimeo will return the lowest rate limit regardless of account type or rate limit tier if the request is unfiltered.
https://httpstatuses.com/429
https://developer.vimeo.com/guidelines/rate-limiting
https://developer.vimeo.com/api/common-formats#json-filter

Related

AR.js Is it possible to update the location of a gps-entity-place?

Is it possible in AR.js to move an object placed with gps-entity-place by modifying its longitude and latitude ?
I tried to change the attribute "gps-entity-place" of the entity. It works the first time but fails after.
gps-entity-place is a read-only attribute
Instantiated objects with read-only attributes must be prepared before displaying them:
serve the gist over HTTPS.
geolocation is not very accurate, improvements here could improve scene placement.
createAttribute can be used for non-standard attributes, with hyphens like gps-entity-place.
gps.value is used for setting values before applying them with setAttributeNode.
tweak position="[-l 0 +r] [-lower 0 +higher] [-front 0 +behind]" of the welcome text, which is -30 to the left, 0 vertical and -150 away.
use this quick & dirty estimate to orient test entities in world-space.
Demo: markerless.html
In the console the entity a-scene in markerless.html shows device location AR:
<!doctype html>
<html>
<head>
<link rel="canonical" href="https://inspiredlabs.github.io/ar.js/markerless.html" />
<!-- location based aframe v0.9.2 -->
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script><!-- debug -->
<script>
const log = console.log;
window.onload = () => {
let scene = document.querySelector('a-scene'); /* Apply to whole scene */
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
let gps = document.createAttribute('gps-entity-place'),
arjs = document.createAttribute('arjs'),
welcome = document.getElementById('welcome');
arjs.value = 'sourceType: webcam; sourceWidth: 1280; sourceHeight: 960; trackingMethod: best; debugUIEnabled: false;';
gps.value = `latitude: ${position.coords.latitude - 0.001}; longitude: ${position.coords.longitude + 0.001}`;
log(gps.value);
scene.setAttributeNode(gps); /* Apply to whole scene */
scene.setAttributeNode(arjs);
});
}
};
</script>
</head>
<a-scene vr-mode-ui="enabled: false">
<a-entity id="wrapper" position="0 -8 0">
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder>
<a-plane position="0 0 -5.0" rotation="-90 0 0" width="7" height="7" color="#7BC8A4" shadow></a-plane>
<a-text id="welcome" value="Welcome" scale="75 75 75" color="#000000" position="-30 0 -150"></a-text>
<!-- look-at="[gps-camera]" -->
</a-entity><!-- /wrapper -->
<a-camera camera="fov: 60;" gps-camera rotation-reader></a-camera>
</a-scene>
</body>
</html>
If you're looking for different object methods to create properties, you could look into Object.defineProperties().
References:
Reduced-test-cases for WebAR (GitHub Pages)
AR.js, Location based example (starting point)
Modified example
Codepen.io will not work, nor will this: Nicolò Carpignoli, Location Based AR.js
Modified example
JavaScript Object Explorer

GDPR Compliance Sufficiency for Google Family Products

Since the "non-specific" question I asked earlier didn't have the repercussion nor the closure I was expecting and needed, I decided to move on with the implementation I left there and perpetuate the user decision regarding the use of cookies through a cookie, even though this is as stupid as it sounds.
I'll favour the general laziness around replicating the fully functional, yet not exactly useful, HTML of the other topic in here:
<!DOCTYPE html>
<html>
<head>
<title>GDPR Compliance Implementation</title>
<style stype="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html,body{color:#242729;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;line-height:1.26666667}body{background:#FFF;box-sizing:border-box;color:#242729;display:flex;flex-direction:column;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;line-height:1.30769231;min-height:100%;min-width:1075px}a,.s-link{color:#07C;cursor:pointer;text-decoration:none}a.s-link__inherit,.s-link.s-link__inherit{color:inherit}.td-underline{text-decoration:underline!important}div{display:block}p{clear:both;margin-bottom:1em;margin-top:0}input[type="submit"],input[type="button"],button,.button,.btn,[class*="btn-"],.hero-box.double-panel .panel.white .btn{background-color:transparent;border:1px solid transparent;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:inherit;font-weight:400;line-height:1;min-height:2.46153846em;outline:none;padding:.61538462em 1em;position:relative;text-align:center;text-decoration:none;touch-action:manipulation;transition:color .1s ease-in,background-color .1s ease-in,border-color .1s ease-in,box-shadow .1s ease-in;vertical-align:middle}svg:not(:root),symbol,image,marker,pattern,foreignObject{overflow:hidden}svg{width:14px;height:14px}.svg-icon{vertical-align:bottom;-moz-transform:rotate(360deg)}.s-btn .svg-icon{transition:opacity 200ms cubic-bezier(.165,.84,.44,1);margin:-.30769231em .15384615em -.15384615em -.53846154em}select,input,button,.button,a.button:link,.btn,[class*="btn-"],.hero-box.double-panel .panel.white .btn{background-color:#0095ff;border-color:#07c;box-shadow:inset 0 1px 0 #66bfff;color:#FFF}.svg-icon:not(.native) *{fill:currentColor}.s-btn{background-color:transparent;border:1px solid transparent;border-color:rgba(0,89,153,0);border-radius:2px;box-shadow:0 0 0 0 rgba(0,149,255,0);color:#07C;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:400;line-height:1.15384615;outline:none;padding:.8rem;position:relative}.s-btn,.s-btn:focus{background-color:rgba(0,119,204,0)}.s-btn,.s-btn:hover,.s-btn:focus,.s-btn.is-selected,.s-btn[disabled]{background-image:none}.s-btn__inverted{box-shadow:0 0 0 0 rgba(0,149,255,0);color:rgba(204,234,255,0.9)}.s-btn__inverted,.s-btn__inverted:focus{background-color:rgba(255,255,255,0)}.bg-black-700{background-color:#3b4045!important}.fc-white{color:#FFF!important}.baw0{border-width:0}.lh-lg{line-height:1.61538462!important}.ps-fixed{position:fixed}.r0{right:0}.b0{bottom:0!important}.l0{left:0}.grid{display:flex}.grid-center{align-items:center!important;justify-content:center!important}.p16{padding:16px!important}.gs8{margin:-4px}.mx-auto{margin-left:auto;margin-right:auto}.m0{margin:0}.mb-0{margin-bottom:0!important}.mt-10p{margin-top:10%}.ml-auto{margin-left:auto}.gsx,.gsx>.grid,.gsx>[class*="grid--cell"]{margin-bottom:0;margin-top:0}.gs8>.grid,.gs8>.grid--cell{margin:4px}.wmx10{max-width:81.025641rem!important}.z-banner{z-index:5000!important}.hidden{display:none!important}
</style>
</head>
<body>
<div class="mx-auto mt-10p">
<p>GDPR Compliance Implementation</p>
<p>
Have you agree with GDPR Compliance?
<span id="hasCompliedWith">NO</span>
</p>
<p id="disagreeWithGDPR">
Click here to disagree with GDPR
</p>
</div>
<div id="js-gdpr-consent-banner" class="p16 bg-black-700 fc-white ps-fixed b0 l0 r0 z-banner" role="banner" aria-hidden="false">
<div class="wmx10 mx-auto grid grid__center jc-spacebetween gs8 gsx" role="alertdialog" aria-describedby="notice-message">
<div class="grid--cell" aria-label="notice-message">
<p class="mb0 lh-lg">
This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/cookie-policy">Cookie Policy</a>, <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/privacy-policy">Privacy Policy</a>, and our <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/terms-of-service/public">Terms of Service</a>.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
</p>
</div>
<div class="grid--cell ml-auto" aria-label="notice-dismiss">
<button class="s-btn s-btn__inverted fc-white bg-black-700 baw0 p16 js-notice-close" role="status" aria-hidden="true">
<svg aria-hidden="true" id="gdpr" class="svg-icon m0 iconClearSm" width="14" height="14" viewBox="0 0 14 14">
<path d="M12 3.41L10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7z"></path>
</svg>
</button>
</div>
</div>
</div>
<script type="text/javascript">
/*!
* JavaScript Cookie v2.2.0
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
!function(e){var n;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var t=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=t,o}}}(function(){function g(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}return function e(l){function C(e,n,t){if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(t=g({path:"/"},C.defaults,t)).expires&&(t.expires=new Date(1*new Date+864e5*t.expires)),t.expires=t.expires?t.expires.toUTCString():"";try{var o=JSON.stringify(n);/^[\{\[]/.test(o)&&(n=o)}catch(e){}n=l.write?l.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var r="";for(var i in t)t[i]&&(r+="; "+i,!0!==t[i]&&(r+="="+t[i].split(";")[0]));return document.cookie=e+"="+n+r}for(var c={},f=function(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)},a=document.cookie?document.cookie.split("; "):[],u=0;u<a.length;u++){var s=a[u].split("="),p=s.slice(1).join("=");this.json||'"'!==p.charAt(0)||(p=p.slice(1,-1));try{var d=f(s[0]);if(p=(l.read||l)(p,d)||f(p),this.json)try{p=JSON.parse(p)}catch(e){}if(c[d]=p,e===d)break}catch(e){}}return e?c[e]:c}}return(C.set=C).get=function(e){return C.call(C,e)},C.getJSON=function(e){return C.call({json:!0},e)},C.remove=function(e,n){C(e,"",g(n,{expires:-1}))},C.defaults={},C.withConverter=e,C}(function(){})});
window.onload = function(e) {
checkStatus();
document.getElementById( 'gdpr' ).onclick = function(e) {
Cookies.set( 'gdpr', '1' );
checkStatus();
}
document.querySelector( '#disagreeWithGDPR a' ).onclick = function(e) {
Cookies.remove( 'gdpr' );
checkStatus();
}
function checkStatus() {
if( typeof Cookies.get( 'gdpr' ) !== 'undefined' ) {
document.getElementById( 'hasCompliedWith' ).innerHTML = 'YES';
document.getElementById( 'js-gdpr-consent-banner' ).classList.add("hidden");
document.querySelector( '#disagreeWithGDPR' ).style.display = 'block';
} else {
document.getElementById( 'hasCompliedWith' ).innerHTML = 'NO';
document.getElementById( 'js-gdpr-consent-banner' ).classList.remove("hidden");
document.querySelector( '#disagreeWithGDPR' ).style.display = 'none';
}
}
}
</script>
</body>
</html>
I made some changes on my final version, notably to have two buttons, one to manifest the acceptance and another the declinal, instead of just one link to close the banner.
With this, I now register one single Cookie with a boolean-integer value, 1 (one) if the user has accepted the Terms — which was written and left available in a very visible place in the footer — or 0 (zero) if the User declined.
I opted for this format not only to demonstrate the User has a more fine control over the decisions but also to simplify the JS conditions.
But — and here comes the point of this discussion — how to apply this decision to mainly, but not limited to, Google Family Services?
It's so much information scattered across several pages that I honestly got lost, but still I managed to come up with this:
Google AdSense
<script>
(adsbygoogle=window.adsbygoogle||[]);
if( typeof cookie !== 'undefined' ) {
/**
* #internal
*
* Modifying the initialized Google AdSense Object in case the
* User didn't consent with GDPR
*/
if( cookie == '0' ) {
adsbygoogle.requestNonPersonalizedAds = 1;
}
} else {
/**
* #internal
*
* But if the consent Cookie doesn't even exist or if the User is still
* browsing ignoring the GDPR message in the bottom we'll pause the
* Ads Request in order to wait for the User to Consent for the first time
*/
adsbygoogle.pauseAdRequests = 1;
}
</script>
The cookie variable is already initialized in the <head> with the Cookie value
After initializing the AdSense variable, I test for the presence of my cookie and if it's not there — which means the GDPR banner will be visible — I make use of
Google Analytics' pauseAdRequests, which, as far as I understood, would not show any ads while the User doesn't consent to the Terms.
If my Cookie does exist, I then test its value and only if 0 (zero), I configure my AdSense with requestNonPersonalizedAds. I only know what that means in theory, as I haven't seen it in action yet.
Google Analytics
Google Analytics was, apparently, easier:
if( typeof cookie === 'undefined' || cookie == '0' ) {
window['ga-disable-UA-XXXXX-Y'] = true;
}
All I had to do was test the presence of my Cookie or if its value means the non-acceptance and in that case disable the tracking.
Other than that, I also configure it with the IP Anonymization. Because I'm not sure the impact that not having Users' IP Addresses would cause on my reports, it's there by default, opting-out or not.
Well, that sure was a long topic with all details I could come up with and all code I have so far — except the little difference I mentioned — so I believe now I can have a proper answer for this matter that's bothering me for so much time.

NTLM with Postman shows "JSONError | Unexpected token '<' at 1:1 "

I have script to do API automation by fetching data from CSV file and comparing JSON response with the data in CSV file in POSTMAN. I have 12 scenarios/ iterations to verify and each scenario sends more than 20 data picking from CSV file and from JSON response compared more than 10 data. Everything is working fine.
Now Security feature implemented in code, so I have to send the request and Automate the script with ID/PWD. So I used NTML authentication with ID and PWD.
When I run the script with runner, initial two iteration gives perfect response and script passed, then from 3rd iteration all script failed and not getting response. In response it says Data unavailable when I checked in postman console it shows below details.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
<h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
</fieldset></div>
</div>
</body>
</html>
What could be the reason and any solution to solve this.
Screen short
Used NTLM Authentication [BETA] authorization option with ID/PWD
Here are the details for pass scenario
Request Headers:
content-type:"application/json"
cache-control:"no-cache"
user-agent:"PostmanRuntime/7.1.5"
accept:"*/*"
host:"xxxxxx"
accept-encoding:"gzip, deflate"
content-length:599
authorization:"NTLM TlRMTVNTUAADAAAAGAAYAFIAAAAYABgAagAAAAAAAABIAAAACgAKAEgAAAAAAAAAUgAAAAAAAACCAAAABYKIogUBKAoAAAAPUAAzAFcATABJAPxv7ESeMEwAAAAAAAAAAAAAAAAAAAAAAHZECYztsK+qnjG5K0DvDIPzQ09CFXWo0Q=="
Request Body:
Response Headers:
transfer-encoding:"chunked"
content-type:"application/json; charset=utf-8"
location:"xxxxxx/api/rate/zzz"
server:"Kestrel"
persistent-auth:"true"
date:"Wed, 06 Jun 2018 13:40:05 GMT"
Response Body:
rate:5
retailRateAttributes:
error:null
Here are the details of Failed scenario
Request Headers:
content-type:"application/json"
cache-control:"no-cache"
authorization:"NTLM TlRMTVNTUAADAAAAGAAYAFIAAAAYABgAagAAAAAAAABIAAAACgAKAEgAAAAAAAAAUgAAAAAAAACCAAAABYKIogUBKAoAAAAPUAAzAFcATABJAPxv7ESeMEwAAAAAAAAAAAAAAAAAAAAAAHZECYztsK+qnjG5K0DvDIPzQ09CFXWo0Q=="
user-agent:"PostmanRuntime/7.1.5"
accept:"*/*"
host:""xxxxxx""
accept-encoding:"gzip, deflate"
content-length:599
Request Body:
Response Headers:
content-type:"text/html"
server:"Microsoft-IIS/10.0"
www-authenticate:
0:"Negotiate"
1:"NTLM"
date:"Wed, 06 Jun 2018 13:40:05 GMT"
content-length:"1293"
Response Body:
While Postman errors are not the most descriptive, this error typically occurs because your API endpoint does not exist. You may want to check that you are correctly calling the appropriate endpoint
You say that the two first iterations work fine but when you get to the third iteration, get the error. That sounds like the auth/token/session expired.
I got the Postman error message
JSONError: Unexpected token '<' at 1:1<!doctype html>^ today.
I realized that the problem (in my case) was that I tried to access an API that
I had written myself, but forgotten to upload. - Thus, I tried to call an API
that did not exist. (!)
As soon as I uploaded the API, the error went away.

Ionic2 and Aframe in iphone

I'm making a VR 360 application using Ionic2 and Aframe. It should be easy because Aframe is all you need to do it (you set a video asset and load it from a videosphere primitive) but I don´t get the desire result. I have the problem with Ios (works fine in Android and in browser), when I run the application in my iphone the video is played in Iphone player and not in my application therefore I don´t have 360 efect.
I add playsinline like documentation says, I add
<meta name="apple-mobile-web-app-capable" content="yes"/>
too, but not work. I use the next code:
<a-scene>
<a-assets>
<video id="video" src="assets/img/video1.mp4" loop crossorigin playsinline></video>
<img id="cubes-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-cubes.jpg">
<img id="cubes" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/cubes.jpg">
</a-assets>
<a-videosphere src="#video" rotation="0 180 0"></a-videosphere>
<a-image class="link" src="#cubes" position="0 0 -1"></a-image>
<!--<a-entity id="links" layout="type: line; margin: 1.5" position="0 -1 -4">
<a-entity template="src: #cubes" data-src="#cubes" data-thumb="#cubes-thumb"></a-entity>
</a-entity>-->
<a-entity camera look-controls>
<a-cursor id="cursor"
animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150"
animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500"
event-set__1="_event: mouseenter; color: green"
event-set__2="_event: mouseleave; color: black"
raycaster="objects: .link"
material="color:black">
</a-cursor>
</a-entity>
</a-scene>
I thought the problem could be autoplay and I have disable it and I trigger play with a button but I have the same result.
Anyidea what more can I try?
thanks.
Incredible, all weekend searching for an answer and after I post my question I've found it 😓
I needed to add to my config.xml
Here is the answer that helped me
Playing video inline in Ionic/Phonegap (webkit-playsinline not working)

Remove all <br/> tags from CKEditor Output html

I am using CKeditor in my application.When i save content of the CKEditor output is added with tags like this.
<B>Summary:</B>
<P><BR><SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; LETTER-SPACING: normal; DISPLAY: inline !important; FONT: 15px/20px Helvetica, Arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">The company's latest tweet simply states that "our team continues to investigate, but at this time, we're still unable to confirm that any security breach has occurred. Stay tuned here."</SPAN></P><BR>
<P><BR>Facebook : http://www.facebook.com</P><BR>
How Can I remove all the "break" tags out of above sample using regular exression in javascript.
Upon Save Text should be appended to "Summary : " like here
Summary: Call back the department if you have not heard from them.The initial story was triggered after a user in a Russian forum
claimed that he hacked and uploaded almost 6.5 millionThe initial
story was triggered after a user in a Russian forum claimed that he
hacked and uploaded almost 6.5 million
But now it's coming like this
Summary:
The initial story was triggered after a user in a Russian forum
claimed that he hacked and uploaded almost 6.5 millionThe initial
story was triggered after a user in a Russian forum claimed that he
hacked and uploaded almost 6.5 million
I am using replace(/[\n\r\f]/g, ' ') ;
replace(/\<!>[\s\S]*?\<!>/ig, '')
but no use.help me.
Finally
CKEDITOR.instances.editor1.getData().replace(/(\r\n|\n|\r)/gm,"");
worked perfectly for my issue.
Thanks.
replace(/[\n\r\f]/g, ' ') ;
will remove actual newlines not the coded ones
try
replace(/<BR>/g, '') ;
or if you want to remove all tags
replace(/<[^>]*?>/g, ' ') ;