Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "request"


How to handle 401 unauthorized error in a Redux React application

  • In response to a client request, the server may return a 401 Unauthorized error.
  • You must correctly catch it, for example, clear the state and redirect to the authorization page.
  • To solve this problem, we wrote a custom Middleware which, in our opinion, is the best solution.

save | comments | report | share on


Australia calls on China to release mother and child held in Xinjiang

  • Hong Kong (CNN) - The Australian government has called on China release a young Australian boy and his mother who have been unable to leave Xinjiang since 2017.
  • The boy's father, Australian citizen Sadam Abudusalamu, said he has been trying to raise awareness of his family's situation ever since his wife Nadila had her passport confiscated by authorities in April 2018, leaving her trapped in China with their young son.
  • In a statement Wednesday, Australia's Minister of Foreign Affairs Marise Payne said the country's embassy in Beijing had "formally requested" that Chinese authorities allow Nadila and Lufty to leave the country.
  • China's Foreign Ministry spokesman Geng Shuang said Wednesday that he hadn't seen the statement from the Australian government.
  • Abudusalamu told CNN that he was happy the Australian government had reached out to China to help secure his family's release, but remained concerned for their well being.

save | comments | report | share on


Early and Often: Getting Feedback on Your Work

  • All of the tests had passed and the app looked great, but we’d overlooked one small issue: A key user-supplied measurement needed four decimal precision, and we only used three.
  • We’ve all had instances both small and large where we present the big reveal of a feature but are greeted with awkward, uncomfortable silence.
  • Developers at FAANG companies are constantly running thousands of tests on features, but you don’t need a huge team to gather feedback faster.
  • Services like Netlify and Heroku offer you the chance to create “preview apps” using the code from a specific pull request.
  • With a few button clicks, you’re able to get a whole new version of your app tied to a specific pull-request URL.
  • As you update the PR, these services rebuild your app, letting you share them with other developers, designers, support, QA, and even with the people who wear blazers.

save | comments | report | share on


In Depth Guide to Serverless APIs with AWS Lambda and AWS API Gateway (Part 1)

  • Lambda is a serverless event-based system that allows triggering functions when something happens, for example, an HTTP request hit our API, or someone uploaded a file directly to S3.
  • SAM is an extension for AWS CloudFormation that reduces some boilerplate code needed to set up AWS Lambda and API-Gateway resources.
  • Let's start by getting a basic serverless API going that just implements a login with the help of AWS SAM, API-Gateway and Cognito.
  • As we said in the template.yaml, It exports a handler function that receives the HTTP request event from API-Gateway when someone sends a POST request to the /signup or /signin endpoints.
  • We create a CognitoUserPool object with the help of the environment variables we got from the SAM template and use this object inside the signIn and signUp functions we export.

save | comments | report | share on


What you should know about CORS

  • Firstly CORS is not a security measure in itself, it's actually the opposite: CORS is a way to circumvent the "Same Origin Policy" which is the security measure preventing you from making ajax requests to a different domain.
  • Now CORS are a way to bypass SOP in some cases where you want to allow one specific website to make requests to your server, even though it would normally be blocked.
  • In a traditional web app you'd use application/json as a content-type so there will be a preflight request, but keep in mind your server may still receive POST requests from other domains, so don't blindly accept them.
  • The only way to get around this is to either use Firefox, or install a web server that will send an Access-Control-Allow-Origin: * header.

save | comments | report | share on


What you should know about CORS

  • Firstly CORS is not a security measure in itself, it's actually the opposite: CORS is a way to circumvent the "Same Origin Policy" which is the security measure preventing you from making ajax requests to a different domain.
  • Now CORS are a way to bypass SOP in some cases where you want to allow one specific website to make requests to your server, even though it would normally be blocked.
  • In a traditional web app you'd use application/json as a content-type so there will be a preflight request, but keep in mind your server may still receive POST requests from other domains, so don't blindly accept them.
  • The only way to get around this is to either use Firefox, or install a web server that will send an Access-Control-Allow-Origin: * header.

save | comments | report | share on