投稿時間:2023-07-26 05:29:34 RSSフィード2023-07-26 05:00 分まとめ(35件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Database Blog Build a centralized audit data collection for Amazon RDS for PostgreSQL using Amazon S3 and Amazon Athena https://aws.amazon.com/blogs/database/build-a-centralized-audit-data-collection-for-amazon-rds-for-postgresql-using-amazon-s3-and-amazon-athena/ Build a centralized audit data collection for Amazon RDS for PostgreSQL using Amazon S and Amazon AthenaDatabase audits are one of the important compliance requirements that organizations need to meet You might be required to capture store and retain the audit data for the long term You also need to meet your organization s information security regulations and standards In this post we show you how to capture and store audit data … 2023-07-25 19:25:32
AWS AWS AWS Rapid Ramp Credit Program (ARRC) | Amazon Web Services https://www.youtube.com/watch?v=5zdf_qJrRLE AWS Rapid Ramp Credit Program ARRC Amazon Web ServicesThe AWS Rapid Ramp Credit Program is here to help your business grow Apply for in AWS credits to quickly get started testing AWS against your specific IT and business requirements by subsidizing a proof of concept Learn more at Subscribe More AWS videos More AWS events videos Do you have technical AWS questions Ask the community of experts on AWS re Post ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster AWS AmazonWebServices CloudComputing 2023-07-25 19:07:29
python Pythonタグが付けられた新着投稿 - Qiita 初学者のオタクが、推しの出演情報を管理するLINEbotを作ってみた。【Python+LINEMessagingAPI+スプレッドシート】 https://qiita.com/unmochan/items/68a24cdf9f35327071e1 linebot 2023-07-26 04:14:50
python Pythonタグが付けられた新着投稿 - Qiita 本日の出演予定をお知らせする機能を追加してみる。[Python+スプシでLINEbot作成その③] https://qiita.com/unmochan/items/f2fbce64d4ff2232622f linebot 2023-07-26 04:04:45
js JavaScriptタグが付けられた新着投稿 - Qiita 【React + Vite + TypeScript】ビルド時に'vite/client'が見つからない問題の解決策 https://qiita.com/itinerant_programmer/items/1d94886f4f996e84f582 react 2023-07-26 04:22:42
Git Gitタグが付けられた新着投稿 - Qiita 【macOS版】Homebrewを使ってgitをインストール https://qiita.com/inakuuun/items/57fd4162d17d72e0c4fa homebrew 2023-07-26 04:23:35
海外TECH MakeUseOf How to Clean Your Dirty iPhone Speakers https://www.makeuseof.com/how-to-clean-speaker-iphone/ grilles 2023-07-25 19:30:24
海外TECH MakeUseOf 5 Reasons Why Gamers Should Buy a Retro Handheld https://www.makeuseof.com/gamers-should-buy-a-retro-handheld-reasons-why/ reasons 2023-07-25 19:15:24
海外TECH MakeUseOf 5 Ways Windows 11 Collects Your Data https://www.makeuseof.com/how-windows-11-collects-data/ windows 2023-07-25 19:15:24
海外TECH MakeUseOf DaVinci Resolve 18.5 Is Out of Beta: The Best New Features to Try https://www.makeuseof.com/davinci-resolve-18-5-new-features/ favorite 2023-07-25 19:12:38
海外TECH MakeUseOf WhatsApp Community vs. WhatsApp Group: What's the Difference? https://www.makeuseof.com/whatsapp-community-vs-whatsapp-group-difference/ community 2023-07-25 19:05:23
海外TECH DEV Community 10 Best Video Calling APIs: Benefits & Features https://dev.to/emilyrobertsatstream/10-best-video-calling-apis-benefits-features-2lhg Best Video Calling APIs Benefits amp FeaturesThe COVID pandemic was a boon to the virtualization of business in almost every industry What is a Video Calling API An application programming interface  API is an intermediary that allows different software to communicate with one other and seamlessly exchange data APIs provide out of the box functionality to engineers and save them the time money and hassle of developing complex features like video chat in house A video calling API is a plug and play component that can be added to an existing web or mobile application to create a live audio and visual communication experience for users What are the Benefits of Using a Video API or SDK As mentioned above APIs save app developers precious resources when building complicated features Similar to an API an SDK can support video chat functionality A software development kit  SDK is a collection of development tools in one installable package including a compiler debugger and software framework The top benefits are as follows Fast Time to Market  Ready made video calling APIs and SDKs allow developers to stay ahead of the competition by quickly integrating functionalities that would otherwise take months to create from scratch Less Maintenance  Your video API will be the sole focus of your integration partner Your API vendor will be dedicated to iterating and maintaining your video calling solution allowing your development team to focus their efforts on other areas of your application More Security  Due to the sensitive nature of video and text based chat content video APIs are held to the highest data security standards When you integrate them you also integrate top level compliance something else your app developers won t need to worry about Resource Conservation  Second to time your most valuable development resource is money Video APIs make the build vs buy decision a cinch while they might require a larger up front investment they are a more cost effective option over time Must Have Video Calling API FeaturesYou might be overwhelmed by the number of video conferencing API options on the market When evaluating possible solutions check closely to make sure they at least include the following features Screen Sharing  Share content in real time to one or more separate devices Recording  Live video recording and storage for later viewing Group Calling  Multiple participants can join a single video conferenceVirtual Noise Cancellation  Improve the quality of your app s video calling Top APIs amp SDKs for Video ConferencingThousands of video calling APIs and SDKs are available but the top ten options listed below are the most reliable feature rich and widely applicable AgoraAgora s video calling API can enhance social apps with fun features like AR facial masks and sound effects In contrast business and education apps can benefit from screen sharing whiteboards and more Agora s advanced in house algorithms provide adaptive resolution from p to p to guarantee better video quality for your app users that requires less bandwidth It applies adaptive video resolution based on the user s network conditions serving the best user experience possible to each person on the call free of stutters jitters or lag under even the most challenging network conditions Notable Features AI powered noise cancellation Voice effects Custom masks and visual filters HD video Supplemental Enhancement Information SEI Agora PricingAgora s video API pricing varies by the quality of the video you wish to feature on your app the number of participants who will use it and for how long TwilioTwilio enables users to create custom video chat experiences with custom layouts and virtual backgrounds using its video calling APIs and SDKs that work across all major browsers and devices Twilio offers developers quality control tools like the Network Quality API to monitor network performance and the Network Bandwidth Profile API to prioritize video track bandwidth across participants Built on top of a cloud based enterprise grade infrastructure Twilio s API delivers a reliable video conferencing interface that can scale alongside your app s growing userbase Notable Features Breakout video conference rooms Integration possible within minutes Robust API and SDK documentation GDPR compliant Virtual video backgrounds and animations Twilio PricingTwilio s free pricing plan for apps requiring only a video conferencing feature If your app needs to support more than two participants in a video chat the pricing increases per participant per minute Enablex ioEnablex io developed a video chat API for developers that gives them everything they need to build a video experience into their applications and software successfully Highly customizable and flexible Enablex places the creative power in the hands of engineers providing the building blocks to build highly scalable and unique real time communication experiences Notable Features Customizable UI with tangible layouts Up to participants per video conference EEE and AES encryption Screen amp file sharing feature Enablex io PricingEnablex io s pricing is determined by the number of participants on a video call and the number of minutes it lasts CometchatCometchat s idiomatic SDKs are designed to help you build quickly Available for iOS Android and web they all work together making cross platform a breeze With documentation that s best in class in depth tutorials and demo apps for every platform it is easier than ever to add and group voice and video call functionality to your app Notable Features amp group text chat functionality Voice and video conferencing tools Online presence indicators Drag amp drop chat widgets White labeled message translation Cometchat PricingCometchat s pricing for video chat is packaged with voice and text based chat offerings too SinchSinch enables developers to create a customizable video chat experience in mobile web or desktop applications to improve brand experience and build deeper connections Sinch s iOS Android and JavaScript in app video calling SDK gives high quality video chat integration and super clear voice capabilities so that you can engage with anyone anywhere almost as good as in person  Sinch allows engineers to focus on their app s customers and takes care of the video call performance security and other telecom needs   Notable Features Cross platform support Enterprise grade reliability Custom video filters and masks Live broadcasting Low video latency Sinch PricingSinch does not feature its video API pricing online but you can contact sales at Sinch to learn more ApphitectApphitect is a leading provider of video calling and conferencing solutions for all sizes of organizations from SMBs to enterprises Its video calling API is customizable and can be tailored to the exact needs of any chat app The video calling solution provides multiple communication channels like one to one video calling group video calling and video and audio conferencing to scale your business meetings webinars presentation and other virtual communication needs Notable Features HD voice and video quality on any device on WiFi G WiMax LTE Sophisticated video quality adaptation to network impairments Scalable media server Up to interactive video participants in a video conference Load balancing Apphitect PricingApphitect s video calling API pricing is not listed on their website Instead they ask prospective customers to contact the Apphitect sales team Video SDKVideo SDK makes video conferencing efficient for both developers and the end user It allows you to explore how the video SDK impacts engagement This tool integrates video calls in minutes or less without compromising on feature functionality including whiteboards Q amp A and polls Video SDK supports unlimited private channels by integrating with advanced video streaming possibilities for platforms like JavaScript React JS React Native Android Flutter and iOS Notable Features Pre built live streaming SDK with participant support Quick integration time of minutes Unlimited channels with enhanced video quality UI support amp auto scalable parallel rooms Unlimited attendee support in a single meeting Video recording Video SDK PricingThe pricing for Video SDK is determined by the video quality you wish to include in your app and the number of participants your video chat app will support ZujoNowZujoNow delivers customizable video call SDKs that support on demand videos live streaming and real time communication to its clients with supreme scalability This platform helps educators connect with students in particular as well as other industries that have recently experienced a pivot to virtual communication and transactions ZujoNow delivers a video solution featuring EEE and easy integration for app developers Notable Features Built in support for healthcare EdTech and dating apps Zero video connection lags Low latency Real time video encoding ZujoNow PricingThe pricing for ZujoNow is minutes for each participant VonageThe Vonage Video API makes it easy to build a custom video experience within any mobile web or desktop application and is built on the WebRTC industry standard available on billions of devices It has the richest set of live video features on the market honed over many years in response to the needs of thousands of customers All voice calling video and signaling traffic is AES encrypted with the option to add AES encryption It only takes four minutes to add live video to websites using just one line of HTML This means that engineers and content creators alike can rapidly build sophisticated live video apps with many participants as the API accommodates users without video development expertise Notable Features Encrypted video recordings Video chat embeds GDPR and HIPAA compliance SIP interconnect Video stream customization HLS and RTMP streaming Video analytics Vonage PricingVonage prices follow simple usage based pricing based on the number of participants in a video session with plans starting at month without bandwidth limitations Daily coDaily co s visual SDKs give you flexibility scalability and control for real time video live streaming and recording Developers can seamlessly integrate real time video and audio into native apps with Daily s iOS and Android SDKs With Daily you can power real time audio and video RTMP live streaming and custom layout recording Plus enable features like live transcription virtual backgrounds and more The company specializes in supporting apps in the education live event and internal collaboration teams industries Notable Features Cross platform support Three types of recording customizable video call UI UX Automatic bandwidth amp switching between group sessions Intuitive development options Automatic tuning of video quality Many to many video sessions with all cameras on Global infrastructure with HD RTMP streaming Daily co PricingThe pricing for Daily co is designed to scale alongside the size of your userbase and offers a discount for high volume usage Integrate the Right Video Chat API With Your App TodayWhile these ten of the top video chat APIs there may be an API better suited for your unique business niche To explore the complete collection of video APIs and SDKs available visit an API marketplace or review site like G or Capterra to find out what other users think of it When evaluating a new video communication solution ensure that it includes all of the features your app s video chat needs Then it is best practice to calculate your estimated monthly cost by multiplying your number of app users by the per user rate on the API s pricing page to ensure you re making a cost conscious choice Happy integrating 2023-07-25 19:37:44
海外TECH DEV Community Working with Django Forms https://dev.to/ericnanhu/working-with-django-forms-gmn Working with Django FormsDownload source code here ️Forms play a vital role in web applications serving as a communication channel between you and your visitors By collecting inputs from the visitors and transmitting them to the backend forms enable effective interaction and collaboration Previously we demonstrated how to build a basic CRUD operation using raw HTML forms If you followed the linked tutorial you will see that it is not an easy task You need to deal with different data types validate the user input match the user input to different model fields set up CSRF protection and so on This will increase the difficulty for future maintenance especially when you need to reuse the same form in multiple webpages Django s built in form functionality can significantly simplify this process and automate the majority of your work In this article we are going to discuss how to create forms the Django way how to create new resources update existing resources as well as how to upload files via Django forms Creating new resources using Django formLet s start easy and consider this basic Post model class Post models Model title models CharField max length content models TextField is published models BooleanField default False def str self return self titleInstead of building the corresponding form using raw HTML let s create a forms py file and add the following code from django import formsclass PostForm forms Form title forms CharField max length content forms CharField widget forms Textarea is published forms BooleanField required False Here we created three form fields each corresponds to one model field in the Post model For the title field forms CharField matches models CharField with the same constraint max length This form field also corresponds to an HTML input field in the rendered webpage which you ll see later The content field is a bit more complex as you must define an extra widget For Django forms you must define both a form field and a widget in order to properly render a field The form field tells Django what data type it will be dealing with and the widget tells Django what HTML input element the field should use These two concepts seem like the same thing but Django separates them because sometimes the same form field requires different widgets For example the forms CharField tells Django it should be expecting characters and texts and by default this field is tied to the forms TextInput widget That is the right widget for the title field but for content we should use a large textbox so its widget is set to forms Textarea Lastly for the is published field forms BooleanField uses the CheckboxInput widget Since this field indicates the status of the post either published or not published you must allow the checkbox to be unchecked by setting required False This way the is published field can return either True or False instead of forcing it to be checked Besides the CharField and BooleanField Django also offers other form fields such as DateTimeField EmailField FileField ImageField ChoiceField MultipleChoiceField and so on Please refer to the documentation for a full list of form fields available in Django Each of these fields also takes a number of extra arguments such as the max length required and widget arguments we just discussed Different form fields may take different arguments but there are some core arguments that are available to all fields required by default each field assumes the value is required If the user pass an empty value a ValidationError will raise If you want to accept an empty value set required False label allows you to define a custom label for the field lt label for id title gt Custom Label lt label gt label suffix by default the label suffix is a colon but you can overwrite it by setting label suffix to a different value initial sets the initial value for the field when rendering the form This is especially useful when you are creating a form for updating existing resources We will discuss more about this later widget specifies the corresponding widget for the field help text include a help text when rendering the form lt span class helptext gt characters max lt span gt error messages The default error message is This field is required and this argument allows you to overwrite it validators allows you to specify a custom validate method localize enables the localization of form data input disabled if set to True the field will be rendered with a disabled attribute To render the form we just defined create a view function from django shortcuts import renderfrom forms import PostFormdef create request if request method GET return render request post create html form PostForm And in the create html template print this form like a regular variable extends layout html block title lt title gt Create lt title gt endblock block content lt div class w mx auto my gt lt h class text xl font semibold underline mb gt Create new post lt h gt lt form action url create method POST gt csrf token form lt button type submit class gt Submit lt button gt lt form gt lt div gt endblock The form will be outputted like this lt form action method POST gt lt label for id title gt Title lt label gt lt input type text name title maxlength required id id title gt lt label for id content gt Content lt label gt lt textarea name content cols rows required id id content gt lt textarea gt lt label for id is published gt Is published lt label gt lt input type checkbox name is published id id is published gt lt button type submit class gt Submit lt button gt lt form gt Styling your Django formAs you can see the form does not look ideal To improve that you must edit the widget so that the rendered HTML input element would include class names from django import formsclass PostForm forms Form title forms CharField max length widget forms TextInput attrs class mb p w full bg gray rounded border border gray focus ring focus ring blue content forms CharField widget forms Textarea attrs class is published forms BooleanField required False widget forms CheckboxInput attrs class Notice that we added an attrs key which stands for attributes The specified attributes will be rendered as a part of the HTML input element Of course it does not have to be class you can also add id size or something else depending on the widget you are using The revised form should give an improved look lt form action create method POST enctype multipart form data gt lt input type hidden name csrfmiddlewaretoken value gt lt label for id title gt Title lt label gt lt input type text name title class mb p w full bg gray rounded border border gray focus ring focus ring blue maxlength required id id title gt lt label for id content gt Content lt label gt lt textarea name content cols rows class required id id content gt lt textarea gt lt label for id is published gt Is published lt label gt lt input type checkbox name is published class mb id id is published gt lt button type submit class gt Submit lt button gt lt form gt Form submissionOf course just rendering the form is not enough You also need to deal with the user input and handle form submissions To accomplish this make sure the form has method POST then go back to the view method and create a condition where a POST request is received def create request if request method GET return render request post create html form PostForm elif request method POST form PostForm request POST if form is valid post Post title form cleaned data title content form cleaned data content is published form cleaned data is published post save return redirect list The form is valid method will validate the form inputs making sure they match the requirements Remember this step is necessary or you will not be able to retrieve the inputs using form cleaned data And next post Post creates a new instance of Post and post save saves it to the database Dealing with relationsIn a real life application it is very common for one model to have relations with other models For example our Post could belong to a User and have multiple Tags attached from django db import modelsfrom django contrib auth models import User Create your models here class Tag models Model name models CharField max length def str self return self nameclass Post models Model title models CharField max length content models TextField is published models BooleanField default False tags models ManyToManyField Tag user models ForeignKey User on delete models CASCADE blank True def str self return self titleHow can we adjust the form so that it allows us to define relations Django offers two form fields ModelChoiceField and ModelMultipleChoiceField for this purpose They are variants of the ChoiceField and the MultipleChoiceField The first one has the default widget Select which creates a single selection field single select forms ChoiceField choices FR Freshman SO Sophomore JR Junior SR Senior GR Graduate widget forms Select attrs lt label for id single select gt Single select lt label gt lt select name single select class id id single select gt lt option value FR gt Freshman lt option gt lt option value SO gt Sophomore lt option gt lt option value JR gt Junior lt option gt lt option value SR gt Senior lt option gt lt option value GR gt Graduate lt option gt lt select gt The latter has the default widget SelectMultiple which creates a multi select field multi select forms MultipleChoiceField choices FR Freshman SO Sophomore JR Junior SR Senior GR Graduate widget forms SelectMultiple attrs lt label for id multi select gt Multi select lt label gt lt select name multi select class required id id multi select multiple gt lt option value FR gt Freshman lt option gt lt option value SO gt Sophomore lt option gt lt option value JR gt Junior lt option gt lt option value SR gt Senior lt option gt lt option value GR gt Graduate lt option gt lt select gt The ModelChoiceField and ModelMultipleChoiceField are based on these choice fields but instead of defining a choices argument they can directly pull available choices from the database through models by specifying a queryset argument user forms ModelChoiceField queryset User objects all widget forms Select attrs class mb p w full bg gray rounded border border gray focus ring focus ring blue tags forms ModelMultipleChoiceField queryset Tag objects all widget forms SelectMultiple attrs class mb p w full bg gray rounded border border gray focus ring focus ring blue Don t forget to edit the view function so that the relations can be saved def create request if request method GET return render request post create html form PostForm elif request method POST form PostForm request POST if form is valid post Post title form cleaned data title content form cleaned data content is published form cleaned data is published post save user form cleaned data user user post set add post post tags set form cleaned data tags return redirect list Uploading files using Django formSometimes when publishing a post you might want to include a cover image to attract more audience Django also provides an ImageField that enables you to upload images to your server image forms ImageField widget forms ClearableFileInput attrs Of course you cannot save the image in the database The image is stored on your server and the path that points to the image will be saved to the database To accomplish this it is best to create a helper function import uuiddef upload file f path uploads images str uuid uuid png with open path wb as destination for chunk in f chunks destination write chunk return pathThis function takes a file f as the input It generates a random name for the file saves it under the directory uploads images and returns the file path as the output You should make sure the directory exists or the function will give an error Next edit the view function like this def create request if request method GET return render request post create html form PostForm elif request method POST form PostForm request POST request FILES if form is valid path upload file request FILES image post Post title form cleaned data title content form cleaned data content is published form cleaned data is published image path post save user form cleaned data user user post set add post post tags set form cleaned data tags return redirect list Line files are transferred separately from the POST body so here you must also include request FILES Line use the helper function to upload the file the file path should be saved to the variable path Line save the path to the database Lastly you also need to ensure your form has enctype multipart form data or uploading files will not be allowed lt form action url create method POST enctype multipart form data gt csrf token form lt button type submit class gt Submit lt button gt lt form gt Updating existing resources using Django formSo far we ve only been talking about how to create new resources using Django forms but what if you need to update existing resources There are two major problems we need to tackle in order to achieve this First of all when displaying the form we must include data from the old resource by setting the initial argument def update request id post Post objects get pk id if request method GET return render request post update html form PostForm initial title post title content post content image post image is published post is published user post user tags post tags all post post Post objects get pk id retrieves the requested post based on its id The outputted form should look like this The second problem with this form is that sometimes you don t need to update the image but if you don t Django will return a validation error As we have mentioned before Django assumes all form fields are required lt ul class errorlist gt lt li gt image lt ul class errorlist gt lt li gt This field is required lt li gt lt ul gt lt li gt lt ul gt So you ll have to set required False for the image field is published forms BooleanField required False widget forms CheckboxInput attrs And then add the condition request method POST for the view function def update request id post Post objects get pk id if request method GET return render request post update html form PostForm initial title post title content post content image post image is published post is published user post user tags post tags all post post elif request method POST form PostForm request POST request FILES if form is valid path upload file request FILES image if image in request FILES else post image Post objects update or create pk id defaults title form cleaned data title content form cleaned data content is published form cleaned data is published image path user form cleaned data user user post set add post post tags set form cleaned data tags return redirect list Line to since image might be None in this case you have to account for this condition If image is in request FILES the image is uploaded and the file path is stored in the variable path If image is not in request FILES path is set to the original file path ModelForm a shortcutAs we ve mentioned at the beginning of this article the whole point of using Django forms is to simplify the form building process But as you can see the create and update views demonstrated in this tutorial are not simple at all even though we only have a very basic form Luckily Django offers a shortcut ModelForm which allows you to create forms directly from models and when saving the form all you need to do is form save without having to retrieve the user inputs one by one and match them with each model field And the best part is it also works for relations and file uploads Let s take a look at this example class PostModelForm forms ModelForm class Meta model Post fields title content image is published tags user Instead of setting up each field you only need to tell Django the corresponding model as well as the model fields you wish to be included in the form The view functions are a lot simpler too def create request if request method GET return render request post create html form PostModelForm elif request method POST form PostModelForm request POST request FILES if form is valid form save return redirect list Line this is all you need to do to save the form input to the database def update request id post Post objects get pk id if request method GET return render request post update html form PostModelForm instance post post post elif request method POST form PostModelForm request POST request FILES instance post if form is valid form save return redirect list Line and pass the existing resource to the form In this article we went over the basics of building web forms using Django s Form and ModelForm classes which should significantly simplify your form building process If you liked this article please also take a look at my other tutorials on Django Create a Modern Application with Django and VueHow to Deploy a Django ProjectHow to Send Emails with Django 2023-07-25 19:07:39
海外TECH DEV Community A arquitetura Cliente-Servidor e o protocolo HTTP https://dev.to/ranierivalenca/a-arquitetura-cliente-servidor-e-o-protocolo-http-21nd A arquitetura Cliente Servidor e o protocolo HTTPPartindo do princípio que o leitor tem noções gerais de rede de computadores e conhecimento sobre a comunicação entre dispositivos através das redes e sabe o que éum protocolo de comunicação este artigo trata sobre a arquitetura cliente servidor e o protocolo HTTP A arquitetura cliente servidor éum modelo de comunicação muito utilizado em sistemas distribuídos e aplicações web Nesse modelo o sistema édividido em duas partes principais o cliente e o servidor O cliente éresponsável por fazer solicitações ao servidor e processar as respostas recebidas Jáo servidor éresponsável por receber as solicitações do cliente processá las e enviar as respostas de volta ao cliente A comunicação entre o cliente e o servidor na Web égeralmente realizada através do protocolo HTTP Hypertext Transfer Protocol que éamplamente utilizado na internet para a transferência de dados entre clientes e servidores Protocolo HTTPO protocolo HTTP ébaseado no modelo requisição resposta onde o cliente envia uma requisição ao servidor e o servidor responde com os dados solicitados ou um código de status indicando o resultado da operação Éum protocolo baseado em texto apesar de poder transportar dados binários e utiliza o TCP Transmission Control Protocol como protocolo de transporte O TCP éum dos principais protocolos da camada de transporte do modelo TCP IP e éresponsável por garantir uma comunicação confiável entre os dispositivos Ao utilizar o TCP como protocolo de transporte o HTTP pode contar com mecanismos como confirmações de recebimento ACKs retransmissão de pacotes perdidos e controle de fluxo para garantir que os dados sejam entregues de forma confiável e em ordem O uso do TCP torna o HTTP uma escolha robusta para a transferência de dados na internet especialmente para aplicações que exigem alta confiabilidade e precisão na entrega de informações StatelessO protocolo HTTP Hypertext Transfer Protocol éconsiderado stateless o que significa que cada requisição enviada pelo cliente ao servidor étratada de forma independente e não contém informações sobre ações anteriores Em outras palavras o servidor não mantém informações sobre o estado da sessão ou interação com o cliente entre as requisições Algumas informações importantes sobre protocolos stateless Cada requisição étratada de forma independente Não háarmazenamento de informações de estado entre requisições O servidor não mantém informações sobre as ações anteriores do cliente A comunicação émais simples e leve pois não hánecessidade de manter uma conexão contínua entre o cliente e o servidor Émais escalável pois cada requisição pode ser processada de forma isolada e distribuída entre diferentes servidores Essa natureza stateless do HTTP tem implicações importantes para o desenvolvimento de aplicações web Como o servidor não mantém informações sobre o estado da sessão todas as informações relevantes devem ser incluídas na própria requisição geralmente através de cabeçalhos ou parâmetros na URL Isso permite que o servidor trate cada solicitação de forma independente tornando a comunicação mais simples e previsível Por outro lado aplicações que exigem uma comunicação mais complexa e interativa como sistemas de autenticação ou carrinhos de compras em e commerce podem enfrentar desafios adicionais ao trabalhar com o HTTP stateless Nesses casos podem ser necessárias técnicas adicionais como o uso de cookies ou tokens para manter informações de estado entre as requisições Falaremos sobre isso em outros artigos futuros EstruturaUma requisição HTTP consiste em uma série de linhas de texto separadas por n que delimita uma linha A requisição tem uma linha inicial contendo o método da requisição o caminho do recurso desejado e a versão do protocolo seguida por cabeçalhos opcionais e o corpo da requisição opcional em algumas situações Exemplo de uma requisição HTTP GET pagina html HTTP Host www exemplo comUser Agent Mozilla Uma resposta HTTP também consiste em uma linha inicial contendo a versão do protocolo o código de status e uma frase descritiva seguida por cabeçalhos opcionais e o corpo da resposta opcional em algumas situações Exemplo de uma resposta HTTP HTTP OKContent Type text htmlContent Length lt html gt lt head gt lt title gt Página de Exemplo lt title gt lt head gt lt body gt lt body gt lt html gt Os cabeçalhos do protocolo HTTP são bastante numerosos além de poderem ser definidos pela aplicação ou seja uma aplicação pode adicionar cabeçalhos não padrões tanto na requisição quanto na resposta Para mais informações sobre os cabeçalhos http vale dar uma olhada na página de cabeçalhos do HTTP do MDN Web DocsA seguir vamos detalhar um pouco mais a requisição request e a resposta response de mensagens deste protocolo Requisições HTTPAs requisições HTTP são a base da interação entre cliente e servidor na arquitetura cliente servidor Cada requisição écomposta por um método um caminho URI falaremos mais adiante sobre URI e URL e uma versão do protocolo esta éa primeira linha da requisição Além disso as requisições podem incluir cabeçalhos e um corpo com dados adicionais A definição do protocolo HTTP em sua versão mais usada atualmente éfeita na RFC um documento que vale muito a leitura e define os seguintes métodos para o HTTP OPTIONSGETHEADPOSTPUTDELETETRACECONNECTApesar disso alguns métodos são mais utilizados e serão explicados melhor a seguir GETO método GET éusado para solicitar a recuperação de um recurso específico no servidor Ele envia os parâmetros na URL geralmente na forma de cadeias de consulta query strings Este éo método mais utilizado na Web pois écom ele que os browsers fazem a requisição para os servidores Exemplo de requisição GET GET pagina html parametro valor amp parametro valor HTTP Host www exemplo comNeste exemplo apenas um cabeçalho extra estásendo enviado Host www exemplo com a URI é pagina html e os parâmetros enviados após o sinal de interrogação são parametro valor e parametro valor Note também que por ser uma requisição que utiliza o método GET não háuma linha em branco após os cabeçalhos jáque este método não suporta um corpo adicional POSTO método POST éusado para enviar dados ao servidor geralmente para criar um novo recurso ou enviar informações sensíveis como senhas ou dados de formulários Exemplo de requisição POST POST criar usuario HTTP Host www exemplo comContent Type application x www form urlencodedContent Length nome João amp email joao example comNeste exemplo alguns cabeçalhos extras estão sendo incluídos Host www exemplo com Content Type application x www form urlencoded e Content Length Note que após os cabeçalhos háuma linha em branco ou seja duas quebras de linha seguidas n n Esta linha indica ao servidor que receberáesta requisição que o cabeçalho do protocolo estáterminado e que todo dado que ainda for enviado faráparte do corpo O cabeçalho Content Length indica quantos bytes o servidor deve esperar no corpo PUTO método PUT éusado para enviar dados ao servidor para criar ou atualizar um recurso específico Exemplo de requisição PUT PUT atualizar usuario HTTP Host www exemplo comContent Type application jsonContent Length nome Maria email maria example com Neste exemplo o tipo cabeçalho Content Type avisa ao servidor que os dados enviados estão no formato application json e por conta disso épossível notar que o corpo da requisição contém dados em JSON formato que serámais explorado adiante DELETEO método DELETE éusado para solicitar a exclusão de um recurso específico no servidor Exemplo de requisição DELETE DELETE excluir usuario HTTP Host www exemplo com Respostas HTTPAs respostas HTTP são enviadas pelo servidor como resposta às requisições feitas pelo cliente Cada resposta écomposta por uma linha inicial contendo o código de status e a versão do protocolo seguida pelos cabeçalhos e o corpo com os dados solicitados se aplicável Os códigos de status são usados para indicar o resultado da requisição Eles são divididos em classes numéricas que indicam o tipo de resposta Alguns dos códigos de status mais comuns são xx Indica que a requisição foi bem sucedida como por exemplo OK ou Created xx Indica redirecionamento como por exemplo Found xx Indica erros do cliente como por exemplo Not Found ou Unauthorized xx Indica erros no servidor como por exemplo Internal Server Error O conteúdo das respostas podem ser de diversos tipos A seguir vamos falar um pouco sobre os mais comuns em aplicações web mais simples JSONO JSON JavaScript Object Notation éum formato leve e amplamente utilizado para troca de dados entre cliente e servidor Ele éfácil de ler e escrever para humanos e fácil de analisar e gerar para máquinas Sua especificação pode ser acessada no site oficial json org Exemplo de resposta com JSON HTTP OKContent Type application jsonContent Length nome João idade email joao example com Note que na resposta após a linha inicial da resposta existem alguns cabeçalhos Content Type application json e Content Length e logo após uma linha em branco Assim como na requisição esta linha em branco indica ao cliente que estárecebendo a resposta que acabaram os cabeçalhos e que o que vem a seguir éo conteúdo corpo da resposta XMLO XML eXtensible Markup Language éoutra opção para troca de dados entre cliente e servidor Ele émais verboso que o JSON mas também éamplamente suportado e estruturado Exemplo de resposta com XML HTTP OKContent Type application xmlContent Length lt usuario gt lt nome gt João lt nome gt lt idade gt lt idade gt lt email gt joao example com lt email gt lt usuario gt HTMLO HTML éusado para definir a estrutura e o layout de páginas web As respostas HTML são renderizadas pelos navegadores para exibir conteúdo aos usuários Exemplo de resposta com HTML HTTP OKContent Type text htmlContent Length lt DOCTYPE html gt lt html gt lt head gt lt title gt Página de Exemplo lt title gt lt head gt lt body gt lt h gt Olá mundo lt h gt lt body gt lt html gt ArquivosAs respostas também podem conter arquivos binários como imagens vídeos documentos etc Nesses casos o servidor define o cabeçalho Content Type apropriado para indicar o tipo de arquivo Exemplo de resposta com arquivo HTTP OKContent Type image jpegContent Length lt dados binários do arquivo gt Neste exemplo o Content Type do cabeçalho estáinformando ao cliente que o corpo da resposta tem os dados binários de uma imagem no formato JPG Considerando a importância de conhecer este cabeçalho vamos falar um pouco mais sobre ele MIME Type em ResponsesO MIME Type Multipurpose Internet Mail Extensions éum tipo de dado que indica o formato e o tipo de conteúdo presente em uma resposta HTTP Ele éespecificado através do cabeçalho Content Type O MIME Type éessencial para que o cliente saiba como interpretar e processar o conteúdo da resposta corretamente Por exemplo o Content Type pode ser definido como application json para indicar que a resposta contém dados no formato JSON ou como text html para indicar que a resposta éuma página HTML ou text css para indicar que a resposta trata se de um arquivo de folha de estilos CSS Vocêpode encontrar mais informações sobre os diferentes tipos de MIME Type no MDN Web Docs URI vs URLURI Uniform Resource Identifier e URL Uniform Resource Locator são conceitos relacionados mas não idênticos Uma URI éuma sequência compacta de caracteres que identifica um recurso abstrato ou físico que pode ser um documento imagem serviço etc A URI éuma terminologia genérica que inclui URLs e URNs Uniform Resource Names Uma URL éum tipo específico de URI que fornece os meios para localizar um recurso através de sua representação como uma sequência de caracteres A URL inclui o esquema como HTTP ou FTP o domínio ou endereço IP a porta o caminho e os parâmetros Em resumo toda URL éuma URI mas nem toda URI éuma URL Por exemplo a URI urn isbn identifica unicamente um livro pelo seu número ISBN mas não éuma URL pois não indica como acessar o recurso Para mais informações sobre URI e URL vocêpode consultar o artigo da Wikipedia Bônus o cliente Curl Uma Ferramenta Versátil para Requisições HTTPO curl éuma ferramenta de linha de comando amplamente utilizada para fazer requisições HTTP e interagir com diversos tipos de serviços na web Com ele épossível realizar operações como enviar dados para APIs realizar testes de conectividade e atémesmo baixar arquivos A versatilidade e simplicidade do curl o tornam uma escolha popular entre desenvolvedores e administradores de sistemas Exemplos de Uso do Curl Requisição GET para uma API de Teste JSONPlaceholderA JSONPlaceholder éuma API de teste que fornece dados fictícios em formato JSON para fins de desenvolvimento e teste Vamos usar o curl para fazer uma requisição GET para a rota users e obter os dados do usuário com id curl Podemos também adicionar o argumento v para que o Curl exiba também os cabeçalhos tanto do request quanto do response curl v Nesse caso a resposta seráalgo como gt GET users HTTP gt Host jsonplaceholder typicode com gt user agent curl gt accept gt lt HTTP lt date Tue Jul GMT lt content type application json charset utf lt content length lt x powered by Express lt x ratelimit limit lt x ratelimit remaining lt x ratelimit reset lt vary Origin Accept Encoding lt access control allow credentials true lt cache control max age lt pragma no cache lt expires lt x content type options nosniff lt etag W fd faofhsofnuono lt via vegur lt cf cache status HIT lt age lt accept ranges bytes lt nel success fraction report to cf nel max age lt server cloudflare lt alt svc h ma lt id name Leanne Graham username Bret email Sincere april biz address street Kulas Light suite Apt city Gwenborough zipcode geo lat lng phone x website hildegard org company name Romaguera Crona catchPhrase Multi layered client server neural net bs harness real time e markets Connection to host jsonplaceholder typicode com left intact Note que as primeiras linhas começam com o caracter gt indicando que esta éuma linha da requisição após uma linha em branco gt apenas seguem uma sucessão de linhas começadas por lt indicando os cabeçalhos da resposta Após uma linha em branco da resposta indicada por um lt vazio começam os dados da resposta Note a grande quantidade de cabeçalhos que étrocado em cada request response Requisição POST para Enviar Dados para uma API ReqRes inO ReqRes in éoutra API de teste que permite fazer requisições HTTP simuladas Vamos usar o curl para fazer uma requisição POST e enviar dados JSON para a rota users com o objetivo de criar um novo usuário curl X POST H Content Type application json d name John Doe job Developer Este artigo fornece uma introdução àarquitetura cliente servidor e ao protocolo HTTP que são conhecimentos importantes para aqueles que desejam trabalhar com o desenvolvimento de Aplicações para Web Éimportante ressaltar entretanto que não abordamos aqui algumas questões importantes relacionadas àsegurança e métodos de autenticação mas que serão abordados eventualmente em outros artigos 2023-07-25 19:04:41
Apple AppleInsider - Frontpage News How the Apple-Goldman Sachs relationship became an unhappy marriage https://appleinsider.com/articles/23/07/25/how-the-apple-goldman-sachs-relationship-became-an-unhappy-marriage?utm_medium=rss How the Apple Goldman Sachs relationship became an unhappy marriageApple s relationship with Goldman Sachs led to the creation of the wildly successful Apple Card but post launch friction and a change in priorities has crashed the relationship into the rocks Apple and Goldman Sachs have an extensive history together with the two inevitably coming up with the Apple Card as part of a wave of financial products that the two work together on However the working relationship has soured over the years with Goldman reconsidering its association with Apple A profile of the relationship by The Information tells of how the alliance deteriorated over four years to a level where the financial giant wants to extract itself from the iPhone maker and away from consumer cards in general Read more 2023-07-25 19:57:19
Apple AppleInsider - Frontpage News Micron launches Crucial X9 Pro and Crucial X10 Pro portable SSDs https://appleinsider.com/articles/23/07/25/micron-launches-crucial-x9-pro-and-crucial-x10-pro-portable-ssds?utm_medium=rss Micron launches Crucial X Pro and Crucial X Pro portable SSDsIf you re on the hunt for a portable high performance solid state drive to help you keep things stored on the go then Micron has just unveiled a couple of options that might help you out Micron s Crucial X Pro Portable SSDLaunched on July Micron Technology has just unveiled two new SSD options the Crucial X Pro Portable SSD and the Crucial X Pro Portable SSD Micron s Crucial series of SSDs are designed for pro creators including photographers and designers among others Read more 2023-07-25 19:50:16
Apple AppleInsider - Frontpage News Apple faces App Tracking Transparency antitrust probe in France https://appleinsider.com/articles/23/07/25/apple-faces-app-tracking-transparency-antitrust-probe-in-france?utm_medium=rss Apple faces App Tracking Transparency antitrust probe in FranceFrance s antitrust agency has officially launched its investigation into Apple s advertising data practices with App Tracking Transparency the target for the regulatory probe In April it was believed the French Competition Authority was preparing an antitrust investigation into Apple On Tuesday the Authorite de la Concurrence confirmed that it was going to investigate In a statement the regulator confirms it has received a grievance about how Apple handles the sale and distribution of apps on the App Store In a translation of the statement Apple is accused of having abused its dominant position by implementing discriminatory non objective and non transparent conditions for the use of user data for advertising purposes Read more 2023-07-25 19:10:23
海外TECH Engadget Amazon’s Kindle Kids e-reader is $40 off right now https://www.engadget.com/amazons-kindle-kids-e-reader-is-40-off-right-now-192011410.html?src=rss Amazon s Kindle Kids e reader is off right nowAmazon has the company s Kindle Kids e reader on sale for percent off right now Its price usually is nearly as low as it was on Prime Day making it an ideal time to surprise your little one s with the gift of distraction free reading The device is an Engadget recommendation in our Best Educational Toys guide The discounted Kindle Kids model is the latest version It includes a cover bundled with your purchase available in three designs resembling children s book art space whale ocean explorer and unicorn valley The e reader s internal tech is identical to the standard Kindle one of our picks for the best e reader Its specs include a high res ppi display GB storage six weeks of battery life USB C charging and an adjustable front light Each purchase comes with a year s subscription to Amazon Kids including a library of thousands of kid appropriate books and hundreds of audiobooks The membership will renew at a month after that so be sure to cancel before then if you only want the free year Although the standard Kindle Kids is our top recommendation you can also save on the Kindle Paperwhite Kids if you don t mind spending more on an upgraded model Compared to the cheaper Kindle Kids model the child focused Paperwhite has a larger screen inches vs inches more LEDs for better front lit reading and an adjustable warm light that s easier on the eyes Amazon s sale has the Kindle Paperwhite Kids for typically only higher than its Prime Day discount Follow EngadgetDeals on Twitter and subscribe to the Engadget Deals newsletter for the latest tech deals and buying advice This article originally appeared on Engadget at 2023-07-25 19:20:11
海外TECH Engadget Netflix lists $900,000 AI job as actors and writers continue to strike https://www.engadget.com/netflix-lists-900000-ai-job-as-actors-and-writers-continue-to-strike-190037630.html?src=rss Netflix lists AI job as actors and writers continue to strikeWill this pair of Hollywood strikes ever end It looks like the big corporations are digging in for a long battle illustrated by Netflix s recent job posting for a machine learning platform product manager The position pays an annual salary of to at a time when many actors make around a day according to this SAG AFTRA contract The role AI will play in creating future entertainment is a key item of debate for both striking parties The job listing indicates that the AI will be used to “create great content and not just develop new algorithms to recommend shows and movies The posting also alludes to a far reaching effort by the streaming giant to integrate artificial intelligence in “all areas of the business A separate section on the company s website goes on to say that Netflix uses AI “to optimize the production of original movies and TV shows That s not the company s only AI heavy job posting promising a giant payday Netflix is also hiring a technical director for generative AI at its burgeoning gaming studio that pays an annual salary of up to as reported by The Intercept nbsp These efforts are already bearing fruit as Netflix currently airs a Spanish reality dating series called Deep Fake Love that scans contestant s faces to create AI generated “deepfakes and its gaming studio employs generative AI to compose narratives and dialogue This all comes after striking actors rejected a proposal from the Alliance of Motion Picture and Television Producers AMPTP that generously offered workers a one time day rate for performers to get scanned for future use as AI enhanced CGI simulacrums forever until the end of time SAG AFTRA says the company would “own that scan their image their likeness and be able to use it for the rest of eternity in any project they want with no consent and no compensation This article originally appeared on Engadget at 2023-07-25 19:00:37
ニュース BBC News - Home Rhodes fires: Brits escape Greek fires as travel advice updated https://www.bbc.co.uk/news/uk-66297476?at_medium=RSS&at_campaign=KARANGA areas 2023-07-25 19:46:02
ビジネス ダイヤモンド・オンライン - 新着記事 弁論部OBは政治家だけではない!東大、早慶、明治、中央の「著名OB全117人」大公開 - 有料記事限定公開 https://diamond.jp/articles/-/326127 顔触れ 2023-07-26 04:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 ラオス中国鉄道が快走、「一帯一路」なお健在 - WSJ PickUp https://diamond.jp/articles/-/326650 wsjpickup 2023-07-26 04:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 賀来龍三郎、51歳でキヤノン社長になった「無名の苦学青年」 - The Legend Interview不朽 https://diamond.jp/articles/-/326284 thelegendinterview 2023-07-26 04:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 「リチウムラッシュ」来るか 開発最前線の米田舎町 - WSJ PickUp https://diamond.jp/articles/-/326649 wsjpickup 2023-07-26 04:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 ハリス米副大統領はどこに? 選挙活動まだ低調 - WSJ PickUp https://diamond.jp/articles/-/326648 wsjpickup 2023-07-26 04:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 本当に賢い人が「人前で話す前にやっていること」ベスト3 - 「静かな人」の戦略書 https://diamond.jp/articles/-/326014 静か 2023-07-26 04:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 【スープストックトーキョー社長に聞く】「理念経営」と「宗教」はどこが違うのか? - 理念経営2.0 https://diamond.jp/articles/-/323899 2023-07-26 04:22:00
ビジネス ダイヤモンド・オンライン - 新着記事 【財務諸表を読みとくカギ】「のれん」とは、何を意味するのか? - 株の投資大全 https://diamond.jp/articles/-/326654 そんな方に参考になる書籍『株の投資大全ー成長株をどう見極め、いつ買ったらいいのか』小泉秀希著、ひふみ株式戦略部監修が月日に発刊された。 2023-07-26 04:19:00
ビジネス ダイヤモンド・オンライン - 新着記事 法政大学の学生にリアルな就活について話を聞いてみた【学生のコメント付き!】 - 大学図鑑!2024 有名大学82校のすべてがわかる! https://diamond.jp/articles/-/326659 2023-07-26 04:16:00
ビジネス ダイヤモンド・オンライン - 新着記事 職場にいる「口数は少ないのに空気を良くする人」と「空気を悪くしてしまう人」の決定的な差とは - 1秒で答えをつくる力 お笑い芸人が学ぶ「切り返し」のプロになる48の技術 https://diamond.jp/articles/-/326635 2023-07-26 04:13:00
ビジネス ダイヤモンド・オンライン - 新着記事 【精神科医が教える】 自己中な人に振り回される “都合のいい人”と“いい人”の決定的な違い - 精神科医Tomyが教える 40代を後悔せず生きる言葉 https://diamond.jp/articles/-/325041 【精神科医が教える】自己中な人に振り回される“都合のいい人と“いい人の決定的な違い精神科医Tomyが教える代を後悔せず生きる言葉【大好評シリーズ万部突破】誰しも悩みや不安は尽きない。 2023-07-26 04:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 【メールの書き方で分かる】「考えている人」と「思考停止している人」の決定的な違い - だから、この本。 https://diamond.jp/articles/-/323995 返信率の高いメールと、低いメールの決定的な差はいったい何でしょうか。 2023-07-26 04:04:00
ビジネス ダイヤモンド・オンライン - 新着記事 9割のサウナーが知らない「危険なととのい」とは? - 医者が教える 究極にととのう サウナ大全 https://diamond.jp/articles/-/326564 割のサウナーが知らない「危険なととのい」とは医者が教える究極にととのうサウナ大全サウナの入り方に戸惑う初心者から、サウナ慣れしてととのいにくくなってきた熟練サウナーまでそれぞれに合わせた「究極にととのう」ための入り方を、自らもサウナーの医師が解説した書籍「医者が教える究極にととのうサウナ大全」が発売に日常のパフォーマンスをあげ、美と健康をレベルアップする「最高のサウナの入り方」を、世界各国のエビデンスを元に教えます。 2023-07-26 04:01:00
ビジネス 東洋経済オンライン 「いい人、採用できない」嘆く企業の残念な4大盲点 「人が集まらない」"時代遅れ"企業の共通点は? | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/686538?utm_source=rss&utm_medium=http&utm_campaign=link_back 時代遅れ 2023-07-26 04:50:00
ビジネス 東洋経済オンライン 中国が圧力?インドネシア「日本の中古電車禁止」 外交弱まる中、民間が築いた信頼維持できるか | 海外 | 東洋経済オンライン https://toyokeizai.net/articles/-/689333?utm_source=rss&utm_medium=http&utm_campaign=link_back 政府高官 2023-07-26 04:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)