Fix get profile
This commit is contained in:
parent
efa4f96e3c
commit
2dc80b95cf
2 changed files with 3 additions and 2 deletions
|
|
@ -37,6 +37,7 @@ func GetProfile(username string) (Profile, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
req.Header.Set("Accept-Language", "en-US")
|
req.Header.Set("Accept-Language", "en-US")
|
||||||
|
req.Header.Set("X-Requested-With", "XMLHttpRequest")
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := http.DefaultClient.Do(req)
|
||||||
if resp == nil {
|
if resp == nil {
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ func TestGetProfile(t *testing.T) {
|
||||||
loc := time.FixedZone("UTC", 0)
|
loc := time.FixedZone("UTC", 0)
|
||||||
joined := time.Date(2007, 02, 20, 6, 35, 0, 0, loc)
|
joined := time.Date(2007, 02, 20, 6, 35, 0, 0, loc)
|
||||||
sample := Profile{
|
sample := Profile{
|
||||||
Avatar: "https://pbs.twimg.com/profile_images/1111729635610382336/_65QFl7B_400x400.png",
|
Avatar: "https://pbs.twimg.com/profile_images/1270500941498912768/W-80pLvu_400x400.jpg",
|
||||||
Biography: "What’s happening?!",
|
Biography: "Black queer lives matter.\nBlack trans lives matter.\n#BlackLivesMatter",
|
||||||
Birthday: "March 21",
|
Birthday: "March 21",
|
||||||
Joined: &joined,
|
Joined: &joined,
|
||||||
Location: "Everywhere",
|
Location: "Everywhere",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue