# Problem with GET /library/sections/

**URL:** <https://forums.plex.tv/t/problem-with-get-library-sections/5659>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [September 28, 2010, 9:07pm UTC](https://forums.plex.tv/t/problem-with-get-library-sections/5659 "2010-09-28T21:07:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lastiko](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lastiko](https://forums.plex.tv/u/lastiko)\
**Post date:** [September 28, 2010, 9:07pm UTC](https://forums.plex.tv/t/problem-with-get-library-sections/5659/1 "2010-09-28T21:07:56Z")

</div>

Hello   
  
  
  
i have a little problem, when i try to connect to plex with Terminal and send a GET /library/sections/  
  
  
  
i received an error ,   
  
  
  
  
  
HTTP/1.0 400 Bad Request  
  
Content-Length: 89  
  
Content-Type: text/html  
  
X-Plex-Protocol: 1.0

Bad Request
# 400 Bad Request
Connection closed by foreign host.  
  
  
Any idea ?

---

<div class="post-metadata">

**Author:** ![imike](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/imike/32/168_2.png) [@imike](https://forums.plex.tv/u/imike)\
**Post date:** [September 28, 2010, 9:38pm UTC](https://forums.plex.tv/t/problem-with-get-library-sections/5659/2 "2010-09-28T21:38:20Z")

</div>

> [@](#):
>
> Hello   
>   
> i have a little problem, when i try to connect to plex with Terminal and send a GET /library/sections/  
>   
> i received an error ,   
>   
>   
> HTTP/1.0 400 Bad Request  
> Content-Length: 89  
> Content-Type: text/html  
> X-Plex-Protocol: 1.0  
>   
> Bad Request
> # 400 Bad Request
> Connection closed by foreign host.  
>   
>   
> Any idea ?

  
  
Try specifying the HTTP version when you make the request.  
  

```auto

MacBook:~ $ telnet localhost 32400<br />
Trying ::1...<br />
Connected to localhost.<br />
Escape character is '^]'.<br />
GET /library/sections/ HTTP/1.0<br />
<br />
HTTP/1.0 200 OK<br />
Content-Type: text/xml;charset=utf-8<br />
Content-Length: 392<br />
X-Plex-Protocol: 1.0<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<MediaContainer size="2" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1283229604" title1="Plex Library" identifier="com.plexapp.plugins.library"><br />
<Directory key="1" type="movie" title="Movies" art="/:/resources/movie-fanart.jpg" /><br />
<Directory key="3" type="show" title="TV Shows" art="/:/resources/show-fanart.jpg" /><br />
</MediaContainer><br />
Connection closed by foreign host.

```

  
  
You can also use curl from the command line:   
  

```auto

MacBook:~ $ curl http://localhost:32400/library/sections/<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<MediaContainer size="2" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1283229604" title1="Plex Library" identifier="com.plexapp.plugins.library"><br />
<Directory key="1" type="movie" title="Movies" art="/:/resources/movie-fanart.jpg" /><br />
<Directory key="3" type="show" title="TV Shows" art="/:/resources/show-fanart.jpg" /><br />
</MediaContainer>

```

---

<div class="post-metadata">

**Author:** ![lastiko](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lastiko](https://forums.plex.tv/u/lastiko)\
**Post date:** [September 28, 2010, 11:58pm UTC](https://forums.plex.tv/t/problem-with-get-library-sections/5659/3 "2010-09-28T23:58:23Z")

</div>

imike Thank u

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:47pm UTC](https://forums.plex.tv/t/problem-with-get-library-sections/5659/4 "2019-12-20T20:47:52Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
