I'm trying to do this diagram using TikZ but I haven't managed to draw the curved arrow (see what I tried in the commented lines). How can I draw an arc between two Cartesian coordinates? How can I fit all the diagram into a rectangle? What I have did doesn't work...
I want something like this:
\draw [->, radius=r] (x1,y1) arc (x2,y2); I have tried the solution given in the comment but I'm not satisfied.
MWE
\documentclass[border=10pt]{standalone} %\usepackage[margin=1cm]{geometry} \usepackage{tikz,xcolor} \usepackage{hyperref} \usepackage{tkz-euclide} \usetkzobj{all} \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,} \tikzset{ b/.style={draw, rectangle, rounded corners=2ex,minimum height=0.5in, minimum width=2in,align=center}, c/.style={draw, rectangle, rounded corners=2ex, minimum height=0.5in, minimum width=2in,align=center, rotate=-90}, ar/.style={rounded corners=2ex,->,>=latex }, myarrow/.style args={#1 colored by #2 and #3}{ -stealth,line width=#1,#2,postaction={draw,-stealth,#3,line width=(#1)/3, shorten <=(#1)/3,shorten >=2*(#1)/3}, } } \makeatletter \newcommand{\gettikzxy}[3]{% \tikz@scan@one@point\pgfutil@firstofone#1\relax \edef#2{\the\pgf@x}% \edef#3{\the\pgf@y}% } \makeatother \begin{document} \begin{tikzpicture} \node (client) [b] {Client}; \node (serveur) [b, left=4 cm of client.west] {Serveur}; \gettikzxy{(client)}{\axc}{\ayc} \draw[thick] (client.south) -- (\axc, \ayc - 300); \gettikzxy{(serveur)}{\axs}{\ays} \draw[thick] (serveur.south) -- (\axs, \ays - 300); \draw [ar] (\axc, \ayc - 100) -- node[above]{\parbox[t]{5cm}{\centering POST \nolinkurl{authentification/}\\username=user\&password=abc123}} (\axs, \ays -100); \draw [ar] (\axs, \ays - 150) -- node[above]{\parbox[t]{5cm}{\centering HTTP 200 OK\\ \color{green}{\{Token : "JWT"\}}}} (\axc, \ayc -150); \draw [ar] (\axc, \ayc - 200) -- node[above]{\parbox[t]{5cm}{\centering GET \nolinkurl{api/user/id}\\ \color{green}{JWT : Token} }} (\axs, \ays -200); \draw [ar] (\axc, \ayc - 250) -- node[below]{\parbox[t]{5cm}{\centering HTTP 200 OK\\ \color{green}{\{name : foo\} }}} (\axs, \ays -250); %\draw[->] (\axs,\ays - 200) arc (-120:30:5) ; % Draw the arc which center is (2,1) %\draw[thick,red] ([shift=(90:1cm)]\axs,\ays-175) arc (90:360:0.9cm); % \draw [->] (\axs,\ays-150) arc (\axs,\ays-200,2.1); %\draw [<->] (0:2.1) arc (0:60:2.1); %\draw [->,line width=5pt] (\axs:-200) arc (\axs:-300); %\draw [ar] ([yshift=0.5cm]serveur.south) -- node[above]{ % \parbox[t]{5cm}{POST authentification/\\username=...\&password=..}} ([yshift=0.5cm]client.south); %\draw [ar] ([yshift=-0.5cm]client.south) -- ([yshift=-0.5cm]serveur.north); \node [rectangle, opacity=0.2, fill=blue, fit=(client)(serveur),]{}; \draw[->, thick] (\axs-3,\ays-150) to[bend left=250] (\axs-3,\ays-200); \end{tikzpicture} \end{document} 

\draw (0,0) to[bend left=45] (2,0);.\node [rectangle, opacity=0.2, fill=blue, fit=(client)(serveur),]{};doesn't work.